Clarity

  • 1.  Is it possible to use Gel Scripting to send Manual Action Items to a dynamic set of users

    Posted Nov 15, 2016 07:28 PM

    Is it possible to send Manual action items to a dynamic set of user accounts using GEL Script against a native or custom object. We have a need as part of Governance of Programs and Projects to involve the Program Manager to approve Change Requests raised against a sub-project of the Program.

     

    Wondering if there is any sample code that I can use to achieve this goal.

     

    I have sample code for sending email but am wondering if it is possible to send a Manual Action item with specific actions to a dynamically retrieved list of user accounts (like the Programs Manager, and select members of certain user groups).

     

    We cannot use a Manual Action Item type in the process because that would requires us to choose specific users or groups. Our goal is to determine the "Assignee" dynamically for the manual action item upon the creation or update of a custom sub-object of the Investment object.

     

    Thanks in Advance

     

     

    Ashwin



  • 2.  Re: Is it possible to use Gel Scripting to send Manual Action Items to a dynamic set of users

    Posted Nov 16, 2016 06:00 AM

    Hi

     

    Yes it's possible. What I usually do is via SQL query I get the "dynamic users" and via GEL too I add them to:

     

    1. Option 1: a custom field  (aux field) not visible in CA PPM UI. Then I use that aux field for the "assignee"

     

    2. Option 2: add  the dynamic users into an aux group. Then I use that aux group for the "assignee"

     

    In your GEL you may want to blank aux field or delete aux group after process completes, depending on your needs or design.



  • 3.  Re: Is it possible to use Gel Scripting to send Manual Action Items to a dynamic set of users

    Posted Nov 16, 2016 01:56 PM

    Hello Aurora Gaimon,

     

    Under Option 1 in your solution, how do you reference the AUX attribute for assignment. When I click on the binoculars for Assignee within the manual action item, I get to pick from a list of System Roles, Groups, or Named Resources.

     

    I am not seeing any option to pick from a field. Not sure what I am missing.

     

     

    Ashwin Kumar (Contractor)

    NetImpact Strategies, Inc.

    National Cancer Institute

    Center for Biomedical Informatics and Information Technology

    9609 Medical Center Drive, 1W532

    Rockville, MD 20850

     

    Email:  Ashwin.Kumar@NIH.Gov<mailto:Ashwin.Kumar@NIH.Gov>

    Phone: 240-276-7603



  • 4.  Re: Is it possible to use Gel Scripting to send Manual Action Items to a dynamic set of users

    Posted Nov 16, 2016 04:08 PM

    Hello Aurora Gaimon,

     

    I was able to figure out the use of the “Resource Field”. Thanks a lot for pointing that out.

     

    But I ran into an issue while configuring the process to run as an “Action”.

     

    • I had set up an action to start the process and setup the action to be invoked through the “Actions Menu” on the Edit Page of a Custom Object’s instance
    • The process is configured such that it is tied to the custom object as the Primary Object  
    • While attempting to run the process through the Action Menu on the edit page I am receiving the following error and this error happens even before the Start Step is touched.

    -        com.niku.bpm.engine.BpmProcessInstanceException: com.niku.bpm.BpmException: com.niku.union.utility.MessageKeyException: BPM-0519: Internal Process Engine Error. Contact your site administrator (Object with name 'thisPortfolio Item Change Funding Decomposition' refers to object 'change_request_fund' bound to the instance '5006001' is not found).

    -          at com.niku.bpm.engine.ProcessLoader.loadProcessInstances(ProcessLoader.java:711)

    -          at com.niku.bpm.engine.ProcessLoader.loadOrRefresh(ProcessLoader.java:523)

    -          at com.niku.bpm.engine.ProcessLoader.refresh(ProcessLoader.java:398)

    -          at com.niku.bpm.engine.ProcessLoader.run(ProcessLoader.java:233)

    -        Caused by: com.niku.bpm.BpmException: com.niku.union.utility.MessageKeyException: BPM-0519: Internal Process Engine Error. Contact your site administrator (Object with name 'thisPortfolio Item Change Funding Decomposition' refers to object 'change_request_fund' bound to the instance '5006001' is not found).

    -          at com.niku.bpm.engine.statemgmt.RuntimeObject.refreshObject(RuntimeObject.java:250)

    -          at com.niku.bpm.engine.statemgmt.RuntimeObject.getLiveObjectId(RuntimeObject.java:219)

    -          at com.niku.bpm.engine.statemgmt.RuntimeObjectCache.loadRuntime(RuntimeObjectCache.java:533)

    -          at com.niku.bpm.engine.ProcessLoader.loadProcessInstance(ProcessLoader.java:732)

    -          at com.niku.bpm.engine.ProcessLoader.loadProcessInstances(ProcessLoader.java:707)

    -          ... 3 more

    -        Caused by: com.niku.union.utility.MessageKeyException: BPM-0519: Internal Process Engine Error. Contact your site administrator (Object with name 'thisPortfolio Item Change Funding Decomposition' refers to object 'change_request_fund' bound to the instance '5006001' is not found).

    -          at com.niku.bpm.engine.statemgmt.RuntimeObject.getBpmObjectInstance(RuntimeObject.java:488)

    -          at com.niku.bpm.engine.statemgmt.RuntimeObject.getBpmObjectInstance(RuntimeObject.java:453)

    -          at com.niku.bpm.engine.statemgmt.RuntimeObject.refreshObject(RuntimeObject.java:246)

    -          ... 7 more

    -        Caused by: java.lang.Exception

    -          ... 10 more

    -         

    • The same process runs successfully when started “On Demand”

     

    What am I missing in the setup?



  • 5.  Re: Is it possible to use Gel Scripting to send Manual Action Items to a dynamic set of users

    Posted Nov 17, 2016 05:02 AM

    Hi

     

    Same process when running "on demand" (from object instance processes tab -- Available) it works

    Same process when running "Action Menu" (from object instance) it does not work

     

    That's strange,.. if this is the case, I'd log a case with CA Support.

     

    On the other hand, if you are using 2 different processes definition which are supposed to do the same, ensure you did not hard-code any internal ID like 5006001 while testing:[...] Object with name 'thisPortfolio Item Change Funding Decomposition' refers to object 'change_request_fund' bound to the instance '5006001' is not found [...}



  • 6.  Re: Is it possible to use Gel Scripting to send Manual Action Items to a dynamic set of users

    Posted Nov 17, 2016 07:35 PM

    Hello,

     

    The issue was with how the Action was setup. I had mapped an attribute in the Define Primary Object section, which is what was causing this issue. Removing the mapping resolved it.

     

    CA Support helped with the research and I am waiting for them to provide the purpose for such mapping while defining an Action for Process Execution.

     

     

     

     

    Ashwin Kumar (Contractor)

    NetImpact Strategies, Inc.

    National Cancer Institute

    Center for Biomedical Informatics and Information Technology

    9609 Medical Center Drive, 1W532

    Rockville, MD 20850

     

    Email:  Ashwin.Kumar@NIH.Gov<mailto:Ashwin.Kumar@NIH.Gov>

    Phone: 240-276-7603