Adding users to a process role at runtime   method :- addRuntimeDefinedUser

Hi All,
I have a requester - approver process where I want to assign list of users to Processor for Approval role.
I am getting list in requester CO and at design-time I have declared Processor for Approval as runtime defined in roles tab of process.
Can anybody tell me how to add this users to this role programmatically? may b in execute method or in complete() method?
I came across with one method which looks promising :
IGPRuntimeManager rtManager = GPProcessFactory.getRuntimeManager();
rtManager.addRuntimeDefinedUser();
This method requires IGPProcessInstance and other parameters. Can I get some info abt how to get them?
Sample code will be most welcome.
Thanks and regards,
Amey Mogare

Oops !!!
I got it. Actually you are supposed to enter Technical name of the action as role in this method...
So when I did it, it worked !!!
IGPRuntimeManager rtm = GPProcessFactory.getRuntimeManager();
IUser userJames = UMFactory.getUserFactory().getUserByLogonID("James.bond");
IUser userSuperman = UMFactory.getUserFactory().getUserByLogonID("Super.man");
IGPUserContext userContext1 = GPContextFactory.getContextManager().createUserContext(userJames);
IGPUserContext userContext2 = GPContextFactory.getContextManager().createUserContext(userSuperman);
IGPProcessInstance prInstance = rtm.getProcessInstance(executionContext.getProcessId(),userContext1);
IGPProcessInstance prInstance = rtm.getProcessInstance(executionContext.getProcessId(),userContext2);
rtm.addRuntimeDefinedUserToRole(prInstance, "Action_3", userJames, userContext1);
rtm.addRuntimeDefinedUserToRole(prInstance, "Action_3", userSuperman, userContext2);
This adds the James.bond and Super.man to role "Processor of ApprovalAction" that is "Action_3" !!!
Thanks a lot for your replies guys !!! It helped to achieve it.
Regards,
Amey Mogare

Similar Messages

  • Error in Adding Users to an Adhoc Role ...

    Hi,
    I have a requirement to add two users to receieve the notification. I identified the role to which the notifications are being sent.
    Now i am tring to add the user to that role using
    WF_DIRECTORY.AddUsersToAdHocRole API but i get an error saying that it is an invalid role.
    I checked the package and saw one of the validation it is doing against the table WF_LOCAL_ROLES and the error seems to be because of this vadiation being failed. There are no rows in the table.
    These are the observations.There is data in these views:
    WF_ROLES,WF_USERS and WF_USER_ROLES and the table and WF_LOCAL_USERS but no data is present in the tables, WF_LOCAL_ROLES
    How can i add these users to that role?
    Please help me out on this?
    Thanks in advance.
    Babu

    The version of the workflow builder is 2.6.1.5.1 and this workflow is embedded in Oracle applications version 11.5.4
    Please suggest me a solution for this.
    Thanks,
    Nagendra.

  • How to assign Users to process roles?

    Hi All,
    I have designed a process and I have consolidated all the roles,
    when I intiate the process from the runtime workset it asks to assign users to these roles(I have consolidated all the roles to three mail roles). The problem that I am facing is that the user should not see this screen, depending upon the user login id the approvers should be automatically assigned to the respective roles.
    Is this possible...
    Kindly guide me
    Thanks in Advance
    Sivaprasath

    Hi Sivaprasath,
    assuming that I've got you wright you could try to model the following using the callable object "business logic" and the callable object "assign user to process role".
    With the help of the first CO you can implement the logic to assign the respective approvers to the users (initiator) and let the processflow go on directing it to the appropriate step where the above mentioned second CO assigns the user to the process role (using the result states of the bussiness logic CO)
    At least you are supposed to need an appropriate Parameter that you can consolidate with the User ID.
    Just a quick idea, hope this will work with you.
    Greetings
    Berndt

  • What's the function of runtime defined setting to process role?

    <h3>*Hi ladies and gentlements,*
    *I am new to guided procedure. I have meet a case that I should runtime allocate the roles or users to process action.*
    *But after I set it to runtime define, It seems nothing activated. I had initialized it and saw it within the UWL. But when I opened it, it message "the action is ready to process by another user or role".* I don't know how to runtime define the role of action. Any body can tell me how to implement that?</h3>
    *Thanks*
    *Eric*

    have you checked this blog, hope it may help you a little bit.
    /people/berndt.woerner/blog/2007/09/19/different-ways-to-model-dynamical-assignment-of-user-to-process-roles-using-composition-tool-guided-procedures--part-1

  • Runtime defined process role

    Hello,
    Can anybody point me to some help where I can get info on the Runtime Defined roles in GP Process. I am trying to pass some role dynamically during runtime.
    Regards,
    Madhu

    Hi,
    So, you (as a process designer) define when the assignment of users to process roles is completed – either at process instantiation, or at process runtime, or the initiator is automatically assigned to the relevant process role. Also, apart from the standard process roles like overseer, owner, etc., there also are customizable ones. Here is a link with thelist of process roles and a short description:
    http://help.sap.com/saphelp_nw70/helpdata/en/d9/273a4209a6ae04e10000000a1550b0/content.htm
    In addition, here is a link to a document concerning configuration of process roles:
    http://help.sap.com/saphelp_nw70/helpdata/en/96/b48c42ee585551e10000000a1550b0/content.htm
    Hope this helps
    Petra

  • How to interrogate roles of a user in a process

    I mentioned this in the beta call on Wednesday, but I thought I would enter it here to follow-up on....
    We have a business need to be able to interrogate the roles assigned to a user in our process flow. Here is an example:
    1. A user enters some data on an initiator type human task. (let's say the swimlane or role is 'data entry')
    2. Next, there is an approval type human task that must be completed (it is in the swimlane or role of 'approver')
    3. If the user that performed the data entry task is also associated to the role of 'approver', the approval task should be bypassed.
    So, I think I need to get the user who did the data entry and determine if they have the role associated to the approval task....if so then I can branch around that task in my process flow. Is there a way to do this in the BPM process (preferred)? Or within the Human task definition? Or do I need to write a service of some sort?
    --- Becky Kellinger
    Edited by: bkellinger on Apr 8, 2010 2:06 PM

    Essentially,
    a. You can find the actual performer of a Task by using output/execData/systemAttributes/updatedBy/id
    b. You can use ids:isUserInRole to test user's membership in desired role
    Note that since we have a bug of not exposing identity XPath functions in BPMN, you have to edit the source of BPM. What I did was, create an expression in editor: ora:addQuotes(concat(role, users)) (any dummy expression to get everything setup), then found the expression in the .bpmn file, and replaced it with:
    <from language="http://www.w3.org/1999/XPath" xmlns:bpmn="http://www.omg.org/bpmn20" xmlns:ora="http://schemas.oracle.com/xpath/extension">ora:addQuotes(concat(bpmn:getDataObject('role'), bpmn:getDataObject('user')))</from>
    This will work with Groups but not Swimlane roles (app roles) It is supposed to work with Swimlane roles as well and we will fix it in PS.
    Please let me know if you would like the sample code.

  • How to use process overriden public runtime user?

    Hello,
    While creating a unix/linux dynamic target, I am passing unix/linux hostname and username
    manually.
    I am using the dynamic target in 'Open Terminal Session' and overriding the default username
    with Public authenticated username. Open terminal session is working fine and able to
    ssh the linux host.
    But 'Execute Terminal Commands' process is getting failed while using the same 'Open Terminal
    Session' as target.
    Even though i am passing the sam 'Open Terminal Session' as target; 'Execute Terminal Command' is using the default runtime user rather than using the process overriden public runtime user.
    Please do the needfule for the same. Please let me know if I need to provide more information.
    Thanks,
    Prashant

    Thanks for your reply Chris.
    In Open Terminal Session we have Credentials tab, there we can override process runtime user with public key
    but we dont have anything in execute terminal commands.
    We have credentials tab in 'Execute Unix/linux scripts' also but we cant use Public Authenticated Runtime User.
    I have attached snapshots for ref puposes.

  • USER MANAGEMENT-CO "Assign users to process role"

    HI,How can I assign the CO "Assign users to process role" to one or more users inside of a process?
    Thanks.
    Regards
    David Valenzuela

    Hi David,
    I am not sure whether a callable object can be assigned to more than one user or not, but for assigning one single user to a callable object inside a process, follow the following steps:
    1)Put the callable object in an action.
    2)Put the action in a block.
    3)In the block, under the <b>Roles</b> tab, you will be able to see an item called <b>Processor of <<i>name of action containing this callable object</i>></b>. You don't need to do anything. If you wish, all you can do here that you can consolidate roles of more than one action under a single name such that one user is assigned to all those actions. For the time being, don't do anything.
    4)Put the block in the process.
    5)In the process, under the <b>Roles</b> tab, you would be able to see the same item <b>Processor of <<i>name of action containing this callable object</i>></b> and a drop down in front of it. Choose <b>Initiation Defined</b> from the drop down.
    6)In the process itself, open the <b>Default Roles</b> tab, and now you would be able to see the same item <b>Processor of <<i>name of action containing this callable object</i>></b>. Just click the <b>Add Default</b> button, search for the user, and assign him to this <b>Processor</b>.
    These steps will make sure that when you run the process, the CO <b>Assign users to process role</b> could be opened by only the user you assigned this CO to.
    Bye
    Ankur
    Do reward points if it helps!!

  • Assign User for Process Role Callable Object

    Hi,
         I have a doubt in the Callable Object Assign User for Process Role.wat is the use of this callable object.This Callable Object is used to reterive any portal user information?can any one give description about this Callable Object.
    Regards,
    Satheshkumar

    Hi,
    Take a look at the following [wiki page |https://wiki.sdn.sap.com/wiki/display/BPX/GuidedProceduresCallable+Objects] and look for the callable object you need. There is a link to a tutorial.
    Dick

  • What is the difference between using the command "dsmgmt" and the "Managed By" tab when adding users to the local administrators Account on a Read-Only Domain Controller?

    When I use the
    "dsmgmt" command to add a user to the local administrators account of a RODC I can actually see the user when I use the "Show Role Administrators" parameter. However, I can't see the members of the
    group added to the "Managed By" tab of the RODC object in AD. Even though, the users added using
    "dsmgmt" and by the "Managed By" tab can all log in locally and have admin rights to the RODC. Are there any differences between these two ways of adding users to the local administrators account? 

    Hi,
    For groups, managedBy is an administrative convenience to designate “group admins”. Whatever principal listed in
    managedBy gets permission to update a group’s membership (the actual security is updated on the group’s AD object to allow this).
    In Win2008 and later managedBy also became the way you delegated local administration on an RODC, allowing branch admins to install patches, manage shares, etc. (http://technet.microsoft.com/en-us/library/cc755310(WS.10).aspx). 
    On the RODC, this is updating the RepairAdmin registry value within RODCRoles.
    So the difference between them should be only the way they do the same thing.
    For more details, please refer to the below article:
    http://blogs.technet.com/b/askds/archive/2011/06/24/friday-mail-sack-wahoo-edition.aspx
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • Assign multiple users to a single role?

    I have a process where I need to assign multiple users to a given role.  In this case, I want one of the users to 'win', and take ownership of the process step.  (Imagine the situation where one user is the primary processor, the other is a backup; if the primary is out of the office, i want the secondary to have the ability to pick up the request).
    I've tried to assign multiple users to the same process role as follows:
    rtm.addRuntimeDefinedUserToRole(prInstance,  roleName, user, userContext );
    but the process is only assigned to a single user - from my testing, it seems to be assigned to the first user specified using the above api call.
    Is there a way to do this programatically?

    Hi,
    Can you please advice how you did this?
    I am using Visual composer as my UI. But with looks like i am not able to pass a structure from VC so i can map it to "Assign Users to Process role" CO.
    Per my understanding I need to write a program using GPI API which populates the User_List structure of the above CO. But after that i am not sure how to use this CO. Can anyone give me detailed instructions on how to use the "Assign Users to Process role" CO to assign multiple users to the role dynamicallly?
    Regards,
    Kumar.

  • How do I add user to a Contact Role in 11i? ( GIS )

    Hi Hussein:
    I was trying to find out how to add a list of users to a contact role in GIS? Initially the contact used to be individual email_id's , but right now the user email_ids are added to a new role and in the subsidiary company setup the contact is having a pointer to the role.
    Regards,
    Bala

    Yes, Hussein.. If you login to EBS as a user with GIS Responsibility --> setup -- > Intercompany -- > Subsidiaries
    in the form u will notice 'Notification Options' and you will see a field ' Contact '. This filed normally used to be a email id. For easy manageability they have created a contact role and assigned users to this role. I do now how to get the list of contact roles and how to add the new users to the role, so they can get notifications.
    Regards,
    Bala

  • Participant Assignment to BPM Process Role

    Hi everyone ;
    I need to custom application for participant assignment to BPM process role. You know, this operation has been made under Business Process Workspace > Administration Areas > Organization > Roles But this page is not useful for Administrator user. I want to develop an application that it makes set Participant to BPM App Role. But, i haven't any API.
    Firstly, is this possible? And than, how can i implement it?
    Thanks.

    Is restart of the engine server on which ProcessP deployed is the only solution since the error messages shows up as 'Process Execution Engine has not re-synchronized with the Directory Service. '

  • Configuration of  User Access Review process

    Hi,
    I'm new to the forum.
    I´m looking at the User Access Review process in CUP.
    I would like implement the User Access Review request. So, my question is:
    1.  Where take GRC the data to make the analysis? I need to know the exactly place where data are collected (which table, transaction code or  statistical data)
    In case that GRC use the backend tables, I should be aware of time that tables are operational in the system, correct?
    2. Otherwise, how affects this analysis the performance in backend system?
    3. I have read that it is possible obtain reports with use of Action Usage. The report that I mention is: RAR --> Informer --> Security Reports --> Miscellaneous --> Action Usage by User
    Where does it gets information from? Could be data in the same place that use User Access Review process?
    4. Is it possible to introduce another actors in the Reviewers (In Configuration Tab, User Review > Options > User Review pane)? Now, the reviewers configured are Manager or Role Owner.
    5. To set User Access Reviews, I need some additional technical or is an automatic procedure?
    If there is any requirements that I should be taken into account please, let me know.
    Thanks in advance
    Marta

    Hi,
    I have found this document that answers all my questions:   www.sdn.sap.com/irj/bpx/go/portal/prtroot/docs/library/uuid/b05010a3-ed45-2c10-79b2-96df60a6bf2b
    So, now I have another question:
    The GRC Access Control that I have, ERM is not configured and there is no communication with it; (only RAR and CUP are configured).  So, I would like to know if it´s possible configured User Access Review apart from ERM.
    To realize the Role Usage Synchronization job in ERM, the transaction usage information from RAR alert data is needed. The job also obtains role to user assignments and role content information from the back-end systems. Access Control then translates the transaction usage information into role usage.
    If this information could be extracted from the backend tables, I am looking for an alternative to way to load data in the system, regardless ERM. Is it possible?
    Thanks in advance
    Marta

  • User Exit at process order release or save

    Dear experts,
    Can any one help me which user exit will be useful at the time of process order release or save (t code COR1/COR2).
    My requirement is to stop the process order release if there is any maintenance order is already released on that date.
    Process order should not get released in between the start and finish date of PM order for the same equipment.
    I could acheive this for PM side by using a user exit IWO10002, here if any process order is released for an equipment PM order cannot be released for the same equipment in between start n finish date of the process order.
    Please help me out in finding the user exit for process order release / save.
    Thanks in advence,
    Regards,
    Praveen.

    Hi,
    The following enhancements are available for process order management:
    For order maintenance:
    o   PPCO0006 to predefine entries for order header fields when creating
        an order
    o   PPCO0001 to provide information at the time of saving (for
        production orders and process orders)
    o   PPCO0007 to check or change header data when saving
    o   PPCO0002 to add additional checks that are to take place when
        setting the deletion flag or deletion indicator
    o   PPCO0003 to prevent changes in sales order items that would cause
        changes in the process order for static assembly processing
    o   STATTEXT to format the status line
    o   PPCO0008 to check components that have been changed or added
    o   PPCO0005 to change the storage location and the 'backflush'
        indicator in the reservation
    o   PPCO0013 to change the priority of the selection criteria for batch
        determination in production orders or process orders
    o   PPCO0014 to restrict the selection of process orders that are
        offered when creating external relationships
    o   PPCO0020 to display additional information for another tab page in
        the process order header
    Regards,
    Dhaval

Maybe you are looking for