Runtime assignment of user to task

Hi
I am using getPrincipal(principalId) to dynamically assign user to a task.
Eventhough the BPM context is getting populated with the correct uniqueId of the user, the task is not getting assigned to that user. Here is the exception I am facing in CE 7.2 SP3.
System exception 
[EXCEPTION]
javax.ejb.EJBException: ASJ.ejb.005043 (Failed in component: sap.com/tcbpemhimumear, BC-BMT-BPM-DSK) Exception raised from invocation of public commonj.sdo.DataObject com.sap.bpem.um.functions.GetPrincipalFunctionImpl.invokeSdo(commonj.sdo.DataObject,com.sap.glx.mapping.execution.api.invoker.SdoInvoker$InvocationContext) method on bean instance com.sap.bpem.um.functions.bean.GetPrincipalFunctionBean@886089 for bean sap.com/tcbpemhimumearannotation|sap.comtcbpemhimum~ejb.jarannotation|GetPrincipalFunctionBean in application sap.com/tcbpemhimumear.; nested exception is: java.lang.IllegalArgumentException: SourceDO must be populated
java.lang.IllegalArgumentException: SourceDO must be populated
at com.sap.bpem.um.functions.GetPrincipalFunctionImpl.invokeSdo(GetPrincipalFunctionImpl.java:121)
at sun.reflect.GeneratedMethodAccessor1184.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sap.engine.services.ejb3.runtime.impl.RequestInvocationContext.proceedFinal(RequestInvocationContext.java:47)
at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:166)
at com.sap.engine.services.ejb3.runtime.impl.Interceptors_StatesTransition.invoke(Interceptors_StatesTransition.java:19)
at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
Am I missing any step? Can someone advice please.
Thanks
Vidyadhar

Hi Vidyadhar,
Ensure that the input/output mappings are correct and also ensure that you have selected the radio button for 'Use an expression' under Task > Roles.
Hope this helps!!
Regards,
Arafat

Similar Messages

  • Not receiving emails when assigning a user a task

    Hello friends,
    I am attempting to figure out what I am missing in my configuration here...
    I have a SP2013 site where I added the out of the box task application. When I go to assign a task to an end user, the end user never receives an email informing them that a task has been assigned.
    I believe email is setup correctly because when the site is shared with the same end users an email is sent / received informing the end user they have been granted access to the site in question...
    any thoughts on what I have misconfigured?
    thank you in advance

    Hi,
    As for the incoming settings, not all lists support incoming emails. You could go to Document library settings and see if incoming email setting exist under Communication.
    I’d like to collect more information about the issue. What OOB task application are you using? Did you mean OOB workflow on SharePoint 2010 platform? Does the alert work for the list?
    Please confirm the following for the issue workflow:
    In the start options, try checking Creating a new item will start this workflow.
    In the Approvers box, try only adding one user with mailbox enabled.
    In the Request box, type “Request for the list”
    Regards,
    Rebecca Tu
    TechNet Community Support

  • Dynamical assignment of user to task

    Hi all,
    Iu2019m trying to create a process involving two Users.
    The first User enters data and the second has to validate them.
    If the data entered by the first User is not valid the input task has to be reassigned to him.
    In the output mapping of my Human Activity I found the "Potential Owners" Node.
    Is it possible to map that User to my context-attribute and in return map that attribute to my task as a Potential Owner?
    What would you recommend?
    Regards,
    Bastian

    Hi Michael,
    Thanks for your reply.
    Your description sounds good.
    In the end my Process will be started via Web Service from a Web Dynpro.
    Have you tried that before?
    I guess I have to obtain the portal user which is using the Web Dynpro at runtime and use it as an input parameter while calling the Web Service.
    Inside the process I use that user as a potential owner.
    Would that be possible?
    Regards,
    Bastian

  • Remove optinos in user decision task dinamically

    Hi all,
    I have an user decision task wich have several options. I want to remove (or deactivate) some of these options dinamically or under some conditions...
    Do you know how can i do it?
    May be it's possible to do with a program exit but i don't find any method in the class for do that.
    Thanks in advance.

    Hi,
    Finally, I had to do it. I put the steps in case anyone is interested:
    - Create a Decision Task in workflow builder. Replace the Task used in Control tab by a custom one. You need to create a copy of the standard task 00008267. In my case I've created the task 99000001.
    - The FM to get the options and texts is SWU_GET_DECISION_TEXT_TITLE. We need to create an enhancement point at the end of this FM. I've created a method in a custom class to embed all my code:
    TRY.
      CALL METHOD zcl_im_wf_dec_task=>zz_mod_decision_task
        EXPORTING
          wiid             = wiid
        changing
          ct_decision_text = decision_text[].
    CATCH cx_root.
    ENDTRY.
    - This method has the following parameters:
    WIID                     TYPE SWW_WIID
    CT_DECISION_TEXT     TYPE ANY TABLE
    With the following code you can change the description of the options you want or delete some options dinamically:
    DATA: l_wi_handle  TYPE REF TO if_swf_run_wim_internal,
          lo_wi_dialog TYPE REF TO cl_swf_run_wim_dialog,
          lo_container TYPE REF TO if_swf_cnt_container,
          ls_wi_head   TYPE sww_wihead,
          lv_key       TYPE sww_wi2obj-instid,
          lv_bstyp     TYPE ebstyp.
    FIELD-SYMBOLS: <ls> TYPE ANY.
    * Obtain the header:
    TRY.
        CALL METHOD cl_swf_run_wim_factory=>find_by_wiid
          EXPORTING
            im_wiid     = wiid
          RECEIVING
            re_instance = l_wi_handle.
        lo_wi_dialog ?= l_wi_handle.
        ls_wi_head = lo_wi_dialog->if_swf_run_wim_internal~m_sww_wihead.
      CATCH cx_swf_run_wim .
      CATCH cx_root.
    ENDTRY.
    * Read the container (if you want...):
    TRY.
        CALL METHOD lo_wi_dialog->if_swf_run_wim_wfm~get_wi_container
          RECEIVING
            re_container = lo_container.
      CATCH cx_swf_run_wim .
    ENDTRY.
    * Read the Key:
    SELECT SINGLE instid INTO lv_key
    FROM sww_wi2obj
    WHERE top_wi_id EQ ls_wi_head-top_wi_id.
    * In this example is a workflow for PO;
    SELECT SINGLE bstyp INTO lv_bstyp
    FROM ekko WHERE ebeln EQ lv_key.
    * Depending on the Task;
    CASE ls_wi_head-wi_rh_task.
    *  Authorize  
      WHEN 'TS99000001'.
        LOOP AT ct_decision_text ASSIGNING <ls>.
    *       The first 4 characters are the number of the option.
    *       The following characters are the description.
    *       Delete an option;
          IF <ls>(4) EQ '0001' AND lv_bstyp EQ 'F'.
            DELETE ct_decision_text INDEX sy-tabix.
            CONTINUE.
          ENDIF.
    *       Change the description:
          IF <ls>(4) EQ '0002'.
            IF lv_bstyp EQ 'K'.
              <ls>+4 = 'Authorize'.
            ELSE.
              <ls>+4 = 'Continue with the process'.
            ENDIF.
          ENDIF.
        ENDLOOP.
    ENDCASE.

  • GP: Dynamically assignment of users

    Hello,
    i'm a newbie and i have the following question:
    Can i dynamically assign the user of the next step in a guided procedure?
    The initiator of my GP passes some data to a web service. The web service determines on the basis of the data the user of the next step in my GP. Is this possible? And how can i achieve this scenario?
    Thanks in advance and best regard,
    Matthias

    Hi Matthias,
    Unfortunately, the GP external service callable object only works for RFCs. You cannot use it for a Web Service.
    Therefore, I would propose the following solution. You can import a Web Service as an external service in CAF (using the Composite Application Services perspective in the Developer Studio). Then you can use the external service from a CAF application service. The application service can already be exposed as a callable object, and you can take the user ID as an output. Then you can use the predefined callable object Assign Users to Process Role, and map the application service output to its input. To enable the assignment of the relevant user to the next action, you must consolidate the role created for the Assign Users action to the role created for the next action, and set the type of the new role to Runtime Defined. Then, at runtime the Assign Users object is executed in the background and the user is assigned to execute the next action.
    You can find how-to guides describing how to import a Web Service in CAF and how to integrate it further into CAF in the https://www.sdn.sap.com/irj/sdn/developerareas/platform?rid=/webcontent/uuid/d8dbd703-0801-0010-c9bf-c04bc52f562f">caf [original link is broken] [original link is broken] (see tutorial N.81).
    Hope this helps a bit.
    Regards,
    Zornitsa

  • Central system Administration : User defined task groups

    Hello,
    In SolMan4.0, you can define user-task-groups (e.g. for daily system checks). The definition and processing of those tasks, works.
    But they are not visible in the overview screen of the solution.
    If there is only 1 user-defined task left, the overview does not show any open tasks
    Any idea's ?
    thx
    Steven

    Hi Udo,
    The frequency is set on 'every 3 days'.
    We are on ST-400 SP4 (SP6 is not available I guess)
    I only defined an entry in the tab 'defining User Task Groups'
    and one entry in the tab 'Assigning User Tasks'
    The user task itself is visble as 'open' in the list, but not in the overview of the systems (icon with a red + sign)
    As I work through the tasks, the red +sign changes into a green sign, at the moment that there is one user-defined task left (all the other 'sap'-tasks are 'done').
    regards
    Steven

  • How to find workflow and assign a  user to workflow

    Hi Gurus,
    How to find  the existing workflows, and assign a  user  to a role.
    <REMOVED BY MODERATOR>
    B S B
    Edited by: Alvaro Tejada Galindo on Jan 24, 2008 11:17 AM

    Goto Tcode PFTC.
    Select the task type as Workflow and serach.
    Naveen.

  • Roles not getting assigned to User OIM11gR2

    Hi Experts,
    I have created a Role, Access policy for ACF2 and a rule for automatically provision Users whose Company Code = 200 (company code is a UDF)
    The records are getting provisioned if I assign the role manually to the user and run Evaluate user Policies task. But if i reconcile the user from trusted resource, the users with company code are not getting even the role assigned to them.
    Am i missing something. Please help me out!!

    hi,
    have you run the configuration wizard?
    http://yourhost:port/nwa/cfg-wizard
    there is a task for BPM. just execute it.
    if you have already run the wizard, you can go to following place to check and make further change if required.
    http://yourhost:port/nwa/sys-config
    select "Applications" tab
    put "bpembaseear" in the name filter, select that application in the result table
    you will see the properties tab
    if your locale is not there, you can fix now.
    Best regards,
    John

  • How to disable an out of the box disable User process task  from resource?

    How should I disable the out of the box disable User process task that is assigned to a particular resource? If I disable this disable User process task, when the user is provisioned to the same resource will I be able to stop this disable User process from running?
    My requirement: I need to disable the disable user process task from three resources x, y and z. Whenever a user is provisioned to one of these resources I should stop this disable user process task an out of the box process task from running. How can this be accomplished?? Please help me out on how to configureto remove the process task in the OIM Admin console to stop the process task.

    You can avoid the disable task from triggering by removing the Disable Process Or Access to Application from the task effect drop down in the process task. But this task is triggered once the user is disabled. But still I didn't understand the exact scenario.
    By the way the disable task is triggered when the user gets disabled and not when the user is provisioned.
    Edited by: vindla on Aug 1, 2011 10:26 PM

  • Maximum roles assignment per user

    Hi,
    I am in a security project and after role designing is done there are lot of roles designed by our functional consultants. And there are 33 company codes present in the company. And few end users are responsible for 20 company codes, So when I saw per user more then 450 deriroles created. Now my question is can I assign 450 roles to a user?
    As far as I know 312 roles can be assigned to user max. But is there any profile parameter available in SAP so that I can assign more then default maximum roles.
    Thanks,
    Sudip

    An auditor once had the task to audit a system of "mine" and ended up going for speculation about improvement possibilities in his presentation to the CIO (who was originally an ABAP developer when he started in the company!)
    <blabla>The overall security of the roles could be improved by using composite roles to reduce the number of roles (okay... you can use "personalization" attached to composites...) and therefore profiles assigned to the users. This will (apparently) make maintenance easier (I think he wanted to derive the composites?) and produce less SoD conflicts requiring mitigating controls, thereby avoiding long debates with the auditors each time.</blabla>
    I let him walk into that one on his own steam... the resultant discussion was like a Montypython scene, or possibly even Blackadder...
    Cheers,
    Julius
    ps: Regarding [my hat|http://www.google.ch/imgres?imgurl=http://www.chocolates-ala-carte.com/look/news/candy_mag_feb07/c_i_hat.jpg&imgrefurl=http://www.chocolates-ala-carte.com/look/news/candy_mag_feb07/index.html&usg=__m6YWntia9g543IgeOxZBu_JYSSw=&h=361&w=458&sz=137&hl=de&start=0&zoom=1&tbnid=GQ3eRe-oXx12_M:&tbnh=135&tbnw=172&ei=WkltTc_-Aoa6vwOflpm5BA&prev=/images%3Fq%3Dchocolate%2BAND%2Bhat%26um%3D1%26hl%3Dde%26rlz%3D1R2ADSA_deCH392%26biw%3D1259%26bih%3D544%26tbs%3Disch:1&um=1&itbs=1&iact=hc&vpx=126&vpy=74&dur=9750&hovh=199&hovw=253&tx=143&ty=108&oei=WkltTc_-Aoa6vwOflpm5BA&page=1&ndsp=21&ved=1t:429,r:0,s:0]: easter is around the corner.
    pps:
    If someone can convince me that it's a good idea to increase the max number then I will eat Julius' hat
    Actually I can smell blood in the water here via object K_REPO_CCA... 
    Edited by: Julius Bussche on Mar 1, 2011 8:40 PM

  • Service Desk: Support Team Assignment from User not in a Support Team

    I am working on configuring the Service Desk and all has been going pretty well until now.
    The issue surrounds automatic assignment of Support Teams when a ticket is submitted.
    In cases where people assigned to the org structure (PPOMA_CRM) submits a ticket, the support team is assigned correctly (via Rule 13200137 in PFAC_RESPO), but when an end user submits a ticket, it doesn't assign a Support Team.
    I have not assigned end users to the org structure because they are not part of the support team and have been using PPOMA_CRM to only establish the support org structure.
    So the question is what am I missing to configure SolMan 7.0 so tickets from general users are assigned to the appropriate support team?
    Thank you,
    Brian

    Brian,
    It sounds like you did not maintain the identification tab with the ibase for the end users. You have to list every system a user can create tickets for on their identification tab in the General Partner role.
    It should look something like:
    <system ID> <identification number> <client> <userid>
    DEV 1234567890 100 BSMITH
    QAS 1234567890 100 BSMITH
    PRD 1234567890 300 BSMITH
    the very left field's value should be CRM001 for all three.
    You do not have to fill out the employee role for end users for the functionality you desire.
    regards,
    Jason

  • 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.

  • Purchased CC for business and can only assign one user. How can I assign more users to have it on all 4 computers in the office?

    Purchased CC for business and can only assign one user. How can I assign more users to have it on all 4 computers in the office?

    Hi there
    You would need to purchase a seat for each user.
    What you currently have is 1 seat = 1 user.
    Kind regards
    Bev

  • Unable to assign the user in user group through SQ03

    Hi All,
    When I tried to assign a  user to one user group from SQ03 the tick mark is disables can't assign the user.
    This is happening only to one of the employee only. Others i can mark tick.
    Please advice.
    Imran

    Hi
    Please check if the user has authorization to that query....
    For example if the user is a PA administrator & you are trying to assign this user to a user group which is Time Management ( Time Infosets), then the tick will be disabled.
    This case was encountered in our firm too.
    Please check & revert.
    Regards,
    Megha

  • Error while assigning the user to orgunit and position

    Hi,
    We are having the below issue :
    1.       Obtain the HR master record (P Ids) created by interface - ECC
    2.       Assign a valid user to this HR master record -ECC
    3.       Do the position/Org assignment against this P Id or personnel master record - ECC
    4.       Transfer the Org Id, then the position ID and then the personnel master ID (P Id) to SRM u2013 ECC
    5.       Check if the user is in SYNC in SRM  - Ideally he should inherit the mandatory parameters from the above Orgs in the structure without which he shall not be able to shop in SRM u2013 step executed in SRM
    Please let us know if this process is as per the expectation.
    If so, we are ending up with error in the third step where the assignment is not allowed since the personnel master record is created with prior date than the position and the Org units.
    Actually we are getting the idoc with user alone from other system, org and position ids are blank. So we are assigning the user in the system and we are getting above error.
    Is this the correct process to bring the users alone into the system and doing the position/organization assignment in ECC now?
    Or the Idoc comes with this data as well? 
    Regards
    Venkatesh P
    Edited by: Venkatesh Padarti on Mar 5, 2012 5:33 AM

    Thank you vikas for your reply.
    So we should bring all the data in the idoc(O,S,P). Even though O, S are present in the receiving sytem?
    Regards
    Venkatesh P

Maybe you are looking for