Guided Procedure: Dynamical User Assignment at Runtime with WD API

Hallo out there,
I'm trying to assign a user to a process role.
I set up my process in that way:
Process as root,
sequential block,
First action with callable Object,
Second action with callable Object,
It looks quite easy.
The callable Objects are embedded WD4J UI's and the data transfer GP Context, etc works fine
I'm still starting the process with the GP Designtime center, not via Webdynpro method (startProcess).
The following codesd snippets are placed in the execute method of the first callable object.
I guess a have to use the runtime methods.. not the designtime methods to assign the users
For example:
In Step 1 - execute Method: 
discovering the user for processing step2!
assigning the to the processrole depending for step2!
My Coding in step 1 looks like this:
First step: Getting the user infos:
//  Retrieve an IUser instance by a logon ID specified dynamically at runtime.
          IUser userStep1;
          IUser userStep2;
              userStep1 = UMFactory.getUserFactory().getUserByLogonID("user1");
              userStep2 = UMFactory.getUserFactory().getUserByLogonID("user2");
              IGPUserContext userContext;
              IGPUserContext userContext2;
                 userContext = GPContextFactory.getContextManager().createUserContext(userStep1);
              userContext = GPContextFactory.getContextManager().createUserContext(userStep2);
              IGPRuntimeManager rtm = GPProcessFactory.getRuntimeManager();
Now, i want to assign user2 to step2 :
   IGPProcess process =  GPProcessFactory.getDesigntimeManager().getActiveTemplate(
                      // by specifying its ID
                      processId,
                      // and the user accessing it
                      userContext);
             // create an empty role assignment list
             IGPProcessRoleInstanceList roles = rtm.createProcessRoleInstanceList();
             // get the process role number
             int rolenum = process.getRoleInfoCount();
             // iterate over the required roles
             for (int i = 0; i < rolenum; i++) {
           msgmr.reportSuccess("Anzahl der gefunden Prozessrollen: " + rolenum);
                // create a new role instance by specifying the role's unique name
                IGPProcessRoleInstance roleInstance = roles. createProcessRoleInstance(process.getRoleInfo(i).getRoleName());
   // add a user to the role instance
                roleInstance.addUser(userStep2);
                // add the new role to the assignment list
                roles.addProcessRoleInstance(roleInstance);   
I guess the problem is, that i call the wrong method to assign the user. I need to assign the user with following code snippet...
// dynamically assign a user to a role
rtm.addRuntimeDefinedUserToRole(
                  // process instance
                  prInstance,
                  // role name
                  "Processor",
                  // user that is assigned (IUser)
                  user,
                  // user context (IGPUserContext)
                  userContext);
// dynamically change the user assigned to a role for a particular task
String prInstanceID = prInstance.getID();
rtm.changeTaskProcessor(
                  // process instance ID
                  prInstanceID,
                  // activity instance ID
                  activityInstanceID,
                  // current user (IGPUserContext)
                  currentProcessorContext,
                  // new user (IGPUserContext)
                  newProcessorContext);
Thank you for any hint.

Hi,
Refer this
Re: Adding users to a process role at runtime   method :- addRuntimeDefinedUser

Similar Messages

  • ESS Guided procedure Default role assignment

    We are implementing ESS in EP7 with ECC 6.0
    After setting up Life and Work events it seems that there are default roles Administrator and Overseer that need to be assigned to portal roles, I am just not sure what portal roles to assign.  Are these supposed to be assigned to Guided procedure type roles or to MSS type roles?
    Any insight would be helpful

    Hi Gail,
    These roles are for the GP processes.
    The Default Roles should be configured for each process
    This is an important step as this will ensure that the process is started without the user having to assign users who have will administer and oversee the execution of the process. Typically the users who are assigned to the processes as Administrators are the HR administrators and overseers could be managers. However this is not a hard-and-fast rule and this has to be decided at the time of implementation.
    hope this helps!!
    Regards,
    Sharadha

  • Dynamic VLAN-Assignment from RADIUS with Aironet 1242AG doesn't work properly

    Hello All,
    our setting is to assign VLANs dynamically from RADIUS (freeradius) to Clients connected to the 1242 Access-Points with one SSID. We have Firmware
    12.4(10b)JA/JDA on the Aironet 1242.
    The clients should be connected to one of three VLANs - one for staff, one for students and one for guests. I use the Web-Interface of
    the 1242, because I'm not very familiar with IOS cli.
    After assigning the first VLAN to the SSID -> click Accept, assigning the second VLAN to the SSID (overwriting the previous one) -> click Accept,
    assigning the third VLAN to SSID (overwriting again) -> click Accept,  the assignment of VLANs works really fine,
    (the only thing i change on the page is VLAN, the SSID is set to mandatory WPAv2)
    BUT...
    when the 1242 is rebooted (due a building power off or similar) it doesn't work anymore. Clients end up in an endless authentication loop.
    After doing the procedure again from above - assigning all VLANs sequently once, it works fine again !  till next reboot...
    All VLANs have same encryption, cypher, TKIP+AES CCM. On the Cisco-Site I found a command, which i also tried with no success:
    'aaa authorization network default group radius'.
    I also tried to save the working config and load it into the 1242 again, this also did not work.
    It seems that i'm doing something wrong, but what ?
    Thanks for some help,
    Frank

    All you really need to do is make sure the subinterfaces/vlans are created for each VLAN you need, then have radius push down IETF attributes 64, 65, and 81.

  • Dynamic User Assignment for Interactive Form CO

    Hello!
    I want to determine the processor of an offline Interactive Form (send by mail) by setting the User-ID through the information of the context parameter. Thereofore I go to the Role-section of the corresponding block and choose "Filled from Context-Parameter" for the Processor of the Interactive-Form-Action and choose the field that holds the UserID-Information.
    Result at Runtime: The Process stops just before the Interactive-Form-Action.
    I am sure that I have the right UserId. I the same with a Datadisplay-form and it works but Interactive-Form CO doesn´t work.
    Any idea to this problem?
    Thank for your help.´
    Jörg

    Hi
      I was not able to achieve the same with IF as   Impersonalised form, i was able to achieve with only when i use Composite form as Impersonalised Form, if there are any other posibilities let me know...
    Thanks
    Gopal

  • Business logic callable object and Dynamic User assignment

    hi all,
    I have to design scenario using VC and GP
    using VC i designed a form that consist of some input parameters value,product..
    i integrated the designs created in VC to CO's
    My workflow should be like this
    now if the value<500
    it should go for approval to user1->user3
    if 500<value<1000  means it should go for approval to user1->user2->user3
    i tried this by using a businesslogic callable object
    the input ot this businesslogic CO is "value" parameter
    reult state
    continue BOOL(@value<500)
    break  Bool(500<@value<1000)
    process
    sequential block1
    Altenateblock block
                  Action
                result state:
                 continue->target->seqblock2
                 break->target->seqblock3
                 business logic CO
    seqblock2
                            Action1
                            Action3
    seqblock3
                              Action1
                              Action2
                              Action3
    i designed the workflow like this
    but the problem is that during runtime its directly jumping to seqblock3 with out asking the input value for business callable object
    and its not exiting from that block3.its going like infinite  loop(action1->action2->action3->action1->action2->Action3)
    pls suggest me the way to achieve this task
    Thanks
    kiran
    Edited by: kiran_mareedu on Aug 26, 2009 3:48 AM

    Hi,
    I have the similar issue.
    In my case it is taking too much time for completion.
    It is a background step so it should execute automatically.
    I have also checked Queue's for this.
    But could not understand why it is taking soo much time?
    Regards,
    Pratik

  • What is the user scope when created with the API?

    I noticed that users created with the Adobe Connect API for my meeting/account are always listed in the Administration -> Users and Groups area.  Which probably means that a user's login is only valid for my meetings.  So if they wanted to register or join a meeting controlled by someone else, they would have to re-register or be re-created by that admin.  Is this correct?
    I'm trying to confirm this so that I know how to register a user on my website.  It would be ideal if my website would register the user and also log the user in without the user having to enter a separate password (my website would generate and store the password).  If the API creates a user only for my meetings then this is not a problem.  The user will just always have to go through my website to get to the meeting.  However, if the user created by my Adobe API account can be used to access/register in another person's meetings on Adobe then this approach is not so good because the user would need to know their password.

    yea, guest registration is not an option as I need to restrict access to the meeting.
    My main concern is that another Connect account holder can change the user's password.  If this ever happens, my website would have an old password and would be broken because it wouldn't be able to log the user into their meeting.  This may be a rare case, but the website will be charging for these meetings/webinars.  If the user can't get in at the time of the meeting....  i'll have a lot more problems.
    I guess I'll just need to provide a way for the user to change or enter their own password. 
    Thanks for the info!

  • How to retrieve all users in the portal with UME API

    Hi everybody,
    I would like to know how to retrieve all the users from a portal, which uses LDAP as a source (there are users created in the portal as well)
    My code snippet is :
    IUserFactory userFactory = UMFactory.getUserFactory();
    UserSearchFilter searchFilter = userFactory.getUserSearchFilter();
    searchFilter.setDisplayName("*", ISearchAttribute.LIKE_OPERATOR, false);
    ISearchResult searchResult = userFactory.searchUsers(searchFilter);
    My problem is that with the code above, only the users created in the portal are displayed, and no LDAP users.
    Does someone know how to retrieve all the users whatever is the source?
    Regards
    Renaud

    prakash's code should work.
    however, mine code below doesn't user a search filter. it retrieves everyuser including users like indexadmin etc. Note:
    result.next().toString();
    returns a weird uniqueID used in the portal world.
    getUniqueName()
    gives your the usernames (sAMAccountName in Microsoft AD) people use to logon to the portal.
    try {
      IUserFactory uf = UMFactory.getUserFactory();
      ISearchResult result = uf.getUniqueIDs();
      while (result.hasNext()) {
        String uniqueid = result.next().toString();
        IUser user = uf.getUser(uniqueid);
        String userid = user.getUniqueName();
    } catch(Exception e) {
      //systemout

  • Add external users to WAAD Tenant with Graph API

    Hello,
    is there a way to add an external user to my tenant in WAAD using Graph Api. In Azure Portal when I'm adding new user there are several options (Hotmail acc, User from existing AD) and those are the actions I'm looking for in Graph Api. Is there any way
    to do that programmatically?
    Thanks,
    Andrija

    Hi,
    I am not sure you could use Graph Api to add external user.
    The API only provides operations on objects inside the AD of your tenant.
    https://msdn.microsoft.com/en-US/library/azure/hh974476.aspx
    Regards.
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • Is dynamic VLAN assignment supported with web-authentication?

    The 7.6.130.0 WLC configuration guides says this:
    "Dynamic VLAN assignment is not supported for web authentication from a controller with Access Control Server (ACS)"
    How should we interpret this, exactly? Does this mean that dynamic VLAN assignment is supported with web authentication from a controller if some other RADIUS server is used (Eg: FreeRadius, ISE)?

    It is not supported with any kind of radius server. The radius attributes ACS uses for pushing those settings (64,65,81) are the same for every other radius implementation. Pushing a QoS profile does work.

  • How to change the name of (Guided procedure) GP Runtime View?

    Hello all!
    At Design time in GP (Guided Procedure), I have added a runtime view at the tab "Runtime Views" named Additional Resources to a GP process.  At runtime, when the process is started,  at the left bar appears the button "Additional Resources". Is there a way to change this name? Any idea can be helpfull :).
    Kindly Regards,
    Luiza

    Hi,
    an other solution is change the block property QUERY_DATA_SOURCE_TYPE from "Table" to "Sub-query" , than change at run time the property QUERY_DATA_SOURCE_NAME.
    First create block and add items
    The QUERY_DATA_SOURCE_NAME will be for ex. "Select 'A' as col1, 'B' AS col2, 'C' as col3 from dual"
    Set into items the column name property to col1 , col2 ...
    At run time change the query to "Select 'Z' as col1, 'X' as col2 , 'Y' as col3 from dual"
    in this way you can change the source of column value.
    Caution because if you change value type from varchar2 to date you must cast date into varchar2.
    May be that this way is valid only for view data not for insert-update, i don't remember.
    bye
    Message was edited by:
    Killernero

  • Integrating email with guided procedures

    Hi GP Experts,
    I want to be able to send/receive emails form guided procedures. When I try to configure adapters there are only 2 types available, POP3 and IMAP4. I am unable to use these because of security issues. How else can I integrate email into guided procedures? We have Lotus Notes with a Domino server and we can use Groupware services to integrate this into the portal. Can we somehow use this for getting GP's to email? What alternatives do I have?
    All suggestions will be appreciated.
    Thanks
    Kunal.

    Hi,
    Thanks, yes I have already set up SMTP for sending emails. I want to receive emails in Guided Procedures, for example if someone fills in an offline pdf form and then clicks submit, it should be delivered to the GP inbox ie '[email protected]'.
    What do I need to do this, my understanding was I needed to setup a pop3 or imap4 adapter, then I can use the email templates within GP correct?
    If this cannot be achieved without pop3 or imap4 what are my alternatives?
    Thanks again,
    Kunal.

  • Dynamic User Tracking

    I would like to get the real time updates on end hosts on my switches. From reading other posts it sounds like I need to do the following:
    1. Configure DHCP snooping on the switches.
    2. Enable the mac notification traps on the switches and verify they are being sent to LMS.
    I have catalyst 4000 and 4500 access switches. I've read that I may have problems with how LMS will handle the traps from the 4500 switches in this post: http://forums.cisco.com/eforum/servlet/NetProf?page=netprof&forum=Network%20Infrastructure&topic=Network%20Management&topicID=.ee71a02&fromOutline=&CommCmd=MB%3Fcmd%3Ddisplay_location%26location%3D.2cd34898
    Has anyone had much luck in getting dynamic user tracking to work with the Catalyst 4500?

    Not really. You'd have to run major acquisitions back to back to back, and that will just put too much strain on the server (and network).

  • Guided Procedures Life & Work Events Help Needed

    Our HR Department recently saw an SAP demo of the ESS Life and Work Events, which uses Guided Procedures.  We are now struggling with the decision to use Guided Procedures for the On-Boarding or if this same type of functionality can be delivered with HCM Processes and Forms.  The biggest draw for the Guided Procedures is the u201Cchecklistu201D type delivery.  Does anyone know if it would be possible to use HCMPF and have a similar u201Cchecklistu201D that the new hire can work through.  I heard somewhere that SAP is moving away from recommending the use of Guided Procedures and is instead recommending using HCMPF.

    did you follow this http://wiki.scn.sap.com/wiki/display/ERPHCM/Reusing+ESS+Java+applications+in+ESS+ABAP+Role?original_fqdn=wiki.sdn.sap.com As such work events are not delivered as such in new releases, you can reuse it however,check above.

  • Send form with dynamic fields to guided procedure

    Hi all,
    i am just wondering if GP is able to map fields from the interactive form that is dynamic.
    for example, the request invoice form sometimes may contain more than one records. however, with my limited knowledge on GP, i believed mapping can only be done from ONE input parameter to ONE output parameter?
    pls kindly advise..

    Hi Ashutosh,
    Yeah i have context attribute of type byte which has the image source but the problem is when i am trying to pass (as given in the above metioned blog) the image source from Web Dynpro to Guided procedure (which has Web Dynrpo DC as CO), i was not able to find any image in Guided procedure. So is there any way to make it possible?
    I cant hav attribute as String since i use an Upload UI element to upload the pdf from local machine. Only if i have the context attribute as byte the image is visible in the form once the Pdf if upload from local machine
    i follow this blog for my Web Dynpro DC as CO in Guided procedure
    The specified item was not found.
    Thanks
    Gopal.

  • Identify Guided Procedures Task ID dynamically

    Hi,
    Can anyone please tell me if there is a way to idynamically dentify the id of the task (not the process) that is asigned to the user in Guided Procedures process?
    Say for ex: I have two parallel tasks assigned to one user. Action1 and Action2. For each action a email is sent to the user with a link  (like below) to the task so he/she can directly launch the task from email.
    To view this task href="http://`{write(ctxt.DataSource.Host);}`/irj/portal?NavigationTarget=ROLES://portal_content/com.sap.pct/platform_add_ons/com.sap.caf.eu.gp.folders.gp/com.sap.caf.eu.gp.roles.runtime/com.sap.caf.eu.gp.worksets.runtime/com.sap.caf.eu.gp.pages.procinstance&DynamicParameter=processId%3D`{write(sy.processid);}`%26taskId%3D">Click here
    With the above link, the user is only getting the url to the process but not directly to the task. i.e., when the user clicks on the email link of Action2, the browser opens up with the Action1 selected by default. He will then have to manually click on Action2 to complete that task. I want the user be able to directly go to Action2.
    Please advice.
    Regards,
    Kumar.

    Hi,
    Refer this
    Re: Adding users to a process role at runtime   method :- addRuntimeDefinedUser

Maybe you are looking for

  • How can I connect airport extremes using a wired-switch connection and have roaming capability?

    My goal is to have 2 airport extremes and 1 timecapule connected via an ethernet switch so that I can enable roaming. I have no problems connecting them wirelessly where I create the wireless network on a primary airport wireless then add the others

  • Trying to use Inheritance?

    Here is what I am doing: Reading a text file that has information about employee's. Each line of text looks like this example: Jane Rivers 902-A 05/16/2001 1 16.25 Name, Employee Number(The last letter determines the department name), Date of Hire, D

  • Externally Loaded Dynamic Text Problem

    Hi, Has anyone encountered problems loading in a % sign as part of a string? For example I'm loading the following in from a database through an asp page using sendAndLoad (this is just a snippet of the results): &AnswerEN1_1=8% &AnswerFR1_1= The var

  • Balance in my account

    I just changed my skype name a week ago,because I update my cell phone & I'm sure that in the former account I have credit,please help with this matter adding it in my new account,contact me via email thanks

  • EAP-TLS problems with Cisco AP541N and Server 2008 NPS

    Hi, I want to use EAP-TLS with my shiny new certificates issued by my new Windows CA, and what happens? Nothing works. I don't have a clue what I should do. I try to establish a EAP-TLS connection using my Windows CE mobile device, but my cisco AP541