Agent determination problem

I have a workflow that has been in production for almost a year.  We are in the middle of integration testing for another rollout and I'm getting agent determination errors in this workflow.  There are three steps involved.  The first two use the exact same rule.  The first of these two works fine.  When it tries to run the rule again for the second step, it gets no agent found.  If I test the rule it works.  If I restart the workflow, it works.  When it moves on to the third work item using a different rule, it errors out no agent found.  When I test this rule, it works.  When I restart at this step, it also works.
This is a new integration client that was copied from production.  I've performed the standard workflow customization like I always do.  I've run several other workflows and only notice the agent determination problems in this one.  The workflow hasn't changed in months although there have been some user security changes...I'm not sure how that could really affect the agent determination during the creation of work items. 
One thing that might be important...userA created the first workitem and the agent determination resolves to userB.  When userB executes the first work item and completes, the second work item should also resolve to userB using the exact same rule.  This fails.  I restarted it using my account and it resolves to userB.  UserB executes work item #2 and work item #3 should resolve to userC but the agent determation fails again.  I don't know whether the work item agent is "used" to perform the creation of the next workitem or not but this is the only difference between the first two work items and one works while the other does not.
It's almost like userA can perform the agent determination but userB cannot.  I can't manually execute the agent determination as userB so I ran se37 as myself in debug and changed SYST-UNAME to userB and it worked fine and returned userB as the agent.  That would seem to eliminate security as an issue with the agent determination.

Hi,
Are you absolutely sure that it is not an authorisation issue? Can you give SAP_ALL (and the possible structural authorisations) to all the users that are involved in the process? (I don't think that changing sy-uname in debug mode to another user really is a correct way to try to prove whether this is an authorisation issue.)
The agent determination of the following step is executed by the previous WF agent, if there is no background steps between. So if the previous agent doesn't have enought authorisations, the agent determination will fail.
Regards,
Karri

Similar Messages

  • SRM 7.0 Agent determination problem, SWWORGTASK empty

    Guys,
    I'm working with SRM 7.0 and I'm having a problem in the quality system.
    The table SWWORGTASK is not being populated. When creating a SC, I can see the Agents determined (in the Display/Edit Agents link) and are determined correctly...but when I go to the SWI1 and press on the Agents button to see the agent that has to approve that SC I get the message 'No selected agents'.
    I debugged that button and saw that the table SWWORGTASK was empty!!!!
    I tested in DEV system and worked fine there...that table is full....but in QAS is empty....
    I'm working with the WF WS40000014, WS40000015 and WS40000016 (this is the one that has the approval step) and the task that I think thak has the problem is the 40007953 .
    Is there a way to see if that task could be as General Task in DEV and not in QAS?
    Why is this happening? Do you have any idea?
    Thanks!!!

    Yes, I solved it!!!
    I did what Masa said:
    Go to IMG activity, "Generalize Task" and check the task group 40000003 and 40000007.

  • Problem in agent determination for custom wf of contracts

    Hi
    I've copied standard wf for contracts i.e. 20000079. In my custom wf the step for release contract I've maintained the standard rule 20000029. bcos this rule is assigned for standard one with task 20000172. Am I correct in agent assignment??bcos my agent determination fails and wf goes into error. But if I simulate the rule separately it works fine. So there is no prob in rule,also i've properly binded it with task passing purchasingContract and releasecode.
    Could u pls help me.
    Thanks

    Check that the binding between the workflow and rule are OK. Maybe your workflow is not delivering all the needed parameters for the rule (the same parameters that you are using while simulating the rule).
    Another thing that you should check is that make sure that this is not an authorisation problem. It is possible that the rule is executed by the dialog user (not WF-BATCH) that doesn't have enough authorisations to do all the necessary rule logic. Just give remporarily SAP_ALL to the user who is executing the test.
    Regards,
    Karri

  • Error in resolution of rule ... for step - Agent determination for failed

    Dear Experts,
    in SRM 7.0 CS, i have come accross the following workflow error:
    I have extended my existing organizational plan for a new site (new CoCo, Plant, Purch Org and Purch Gr). But when i use my test users with this site, i receive a workflow error, that has the following wording in SWI2_DIAG:
    Error handling for work item 000000055347
    No links corresponding to the specified data could be determined
    Error in resolution of rule 'AC40000138' for step '0000000293'
    Agent determination for step '0000000293' failed
    Error during result processing of work item 000000055357
    Error when processing node '0000000293' (ParForEach index 000000)
    Error when creating a component of type 'Step'
    Error when creating a work item
    Error when processing node '0000000293' (ParForEach index 000000)
    Work item 000000055356: Object FLOWITEM method EXECUTE cannot be executed
    Error handling for work item 000000055355
    Can you maybe help me understand, what this error means and how to resolve it?
    Thank you very much!
    P.S. my test users work fine if i drag them to another location in my organizational plan. And also if i take other test user from locations where everything works fine and drag them to this "problem" location, than the same workflow error occures.

    Remove the user from the PPOMA node and add him again.. Sometimes this will solve the issue..
    Thanks!!
    Bharath

  • Agent Determination for Service Entry (BO-BUS2091)

    HI,
    I am new to workflow and facing below issue.
    I have created a workflow for Service entry sheet approval (BO- BUS2901) and I am having an issue with the agent determination. I am using my own Ztable to determine the possible agents.
    I am using the following code in the FM of the rule I created for determining the agent:
    FUNCTION ZME_SRV_REL_GET_RESPONSIBLE.
    *"*"Local Interface:
    *"  TABLES
    *"      ACTOR_TAB STRUCTURE  SWHACTOR
    *"      AC_CONTAINER STRUCTURE  SWCONT
    *"  EXCEPTIONS
    *"      NOBODY_FOUND
    INCLUDE <cntain>.
    TABLES: essr_rel, essr,zmm_service_mail.
    DATA: object TYPE swc_object.
    DATA: BEGIN OF essrkey,
    lblni LIKE essr-lblni,
    END OF essrkey.
    DATA: verak_user TYPE csks-verak_user.
    REFRESH actor_tab.
    CLEAR actor_tab.
    swc_get_element ac_container 'service' object.
    if sy-subrc eq space.
    essrkey-lblni = object-objkey(10).
    select single * from essr where lblni = essrkey-lblni.
    select single * from zmm_service_mail
    where frggr = essr-frggr
    and frgsx = essr-frgsx.
    if essr-frgzu eq ' '.
    verak_user = zmm_service_mail-pernr1.
    elseif essr-frgzu eq 'x'.
    verak_user = zmm_service_mail-pernr2.
    endif.
    actor_tab-otype = 'us'.
    actor_tab-objid = verak_user.
    append actor_tab.
    endif.
    ENDFUNCTION.
    When I debug, sy-subrc = 8 at swc_get_element ac_container 'service' object.
    What could be the problem?
    Note- I have gone thru below thread but still I am unable to find the error.
    http://scn.sap.com/thread/2017416

    Hi,
    You should re-read the thread that you quoted above. The mighty Sue Keohan suggested a solution.
    Instead of trying to pass a service *object*, and then extracting the key, you can just pass the key itself.  It has type EESSR-LBLN1.
    swc_get_element ac_container 'service_key' lv_service_key.
    if sy-subrc eq 0.
      essrkey-lblni = lv_service_key.
    (etc)
    cheers
    Paul

  • Agent Determination for Service Entry

    Hi Guys,
    I created a workflow based on BO BUS2901 to send approval notification to an approver and I am having an issue with the agent determination. I am using the cost centre owner from the PR associated with the PO for the service entry as the approver.
    I am using the following code in the FM of the rule I created for determining the agent:
    FUNCTION ZME_REL_GET_RESPONSIBLE.
    *"*"Local Interface:
    *"  TABLES
    *"      ACTOR_TAB STRUCTURE  SWHACTOR
    *"      AC_CONTAINER STRUCTURE  SWCONT
    *"  EXCEPTIONS
    *"      NOBODY_FOUND
      INCLUDE <cntain>.
      TABLES: eban, essr_rel, essr, ekpo, ebkn, csks.
      DATA: object TYPE swc_object.
      DATA: BEGIN OF essrkey,
               lblni LIKE essr-lblni,
               ebeln LIKE essr-ebeln,
            END OF essrkey.
      DATA: verak_user TYPE csks-verak_user, kostl TYPE ebkn-kostl.
      REFRESH actor_tab.
      CLEAR actor_tab.
      swc_get_element ac_container 'ServiceEntry' object.
      IF sy-subrc EQ space.
        essrkey-lblni = object-objkey(10).
        essrkey-ebeln = object-objkey+10(10).
          select * from ekpo where ebeln = essrkey-ebeln.
            select single * from ebkn where banfn = ekpo-banfn.
              kostl = ebkn-kostl.
          endselect.
        select * from csks where kostl = kostl.
          verak_user = csks-verak_user.
        endselect.
        actor_tab-otype = 'US'.
        actor_tab-objid = verak_user.
        APPEND actor_tab.
      endif.
    ENDFUNCTION.
    When I debug, sy-subrc = 8 at swc_get_element ac_container 'ServiceEntry' object.
    What could be the problem?
    Thanks
    Regards

    Hi Sarvesh, T
    This thread was already answered some time ago.  Please open a new Discussion marked as a question.  If the thread you originally posted to has material related to your question, include a link.  Your content is attached below to make it easy for you to simply paste it into the new Discussion.  It is recommended to read the Rules of Engagement and other documents in the Getting Started link at the top right.   If you have any questions, feel free to respond to this DM (Direct Message) and I will be happy to try to assist.
    Rgds,
    Jocelyn (SCN moderator)

  • Responsibility rules : Agent determination only works after restarting the WF

    Hi Experts,
    We are facing a very strange issue related to agent determination in one of our custom workflow:
    For agent determination we are using a responsibility rule with two parameters "Company code" and "Plant".
    The responsibility rule works well and returns the agents for all the company code.
    Recently I have added few company codes to this responsibility rule in the same way we used to maintain and simulate it . It returns the correct agent for newly added company codes but at run time the agent determination is getting failed and the WF goes into an error because of it. However when i restart the WF via SWPR it works well and the agent determination works well either.
    This is only happening for newly added company codes the old ones agent determination work well at the run-time.
    Pls suggest what could cause this problem. If there is a problem in responsibility rule then why it works after restarting from SWPR.
    Thanks in advance. The helpful/correct answers will be rewarded.
    Regards,
    Him

    Hi Rick,
    Thanks for replying.
    1. Can you replicate this problem in the test system?
    Yes I could replicate this issue in test system and it works fine there.
    2. Is this a true responsibility rule or does e.g. a function module get called?
    We have a responsibility where several responsibilities have been added with two parameters "company codes" and "plant". Every responsibility has a POSITION assigned into it and this position contains the related users.
    This responsibility rule is getting called in one other rule with FM. Here in this another rule we are calling the responsibility rule by using the standard FM  RH_GET_ACTORS to fill the ACTOR_TAB.
    I have tried to simulate both the rules and it returned correct agents but failing at run time.
    Regards,
    Him

  • Purchase Requistion - Agent Determination using responsibilities - Issue

    Hi Everyone,
    I am new to workflow. I am having an issue wrt Purchase Requistion - Agent Determination using responsibilities.
    Created some 30 to 40 resposibilities with combination of inputs - R1, P1 & Cost Center
    Checked rule with responsibilities in Simulation mode and for the given inputs shows correct output.
    Same config is present both in DEV and ACP. Simulation works fine in both systems.
    But when I created Purchase Req. in DEV and save it. Workitem is generated for the correct agent. But when I do the same test in Quality, it fails and created Workitems for several agents.
    Checked container info. in both systems,no.of agents is the ONLY difference (i.e. 1 in DEV and 30+ agents in Quality).
    Put shred some light on this issue.
    Workflow Used: BUS2009
    Task : TS00007986
    Thanks a ton in advance.
    Regards,
    Krishna

    Hi,
    Open the workflow (WS*******) with SWDD and see the bindings for the rule in the approval step (using TS00007986). Do they look the same in both environments? Are you passing the same parameters for the rule?
    Another thing that you should check is a possible authorisation error. Maybe the users are not authorised to execute the needed functions for finding the agent inside the rule (common problem).
    Also try to read the technical workflow log (Start a workflow, open SWI1 and drill-down to the workflow log). Can you see some error messages there? You will probably find a message saying that "cannot execute agent rule" or something like that. It is WF behaviour that if it cannot find an agent it will send the work item to all possible agents (unless otherwise configured).
    Regards,
    Karri

  • Agent determination issue in a workflow

    Greetings everyone!
    I'm configuring some business scenario with the help of a business workflow in SAP CRM 7.0 I'm using activity step and want to determine agents using standard SAP rule 10000162 ("Employees for responsible org. unit"). I've tested the rule outside of the workflow and it's working fine, but  in workflow it fails to determine an agent.
    In a log I see following errors:
    Agent determination for step '0000000023' failed;
    Result of agent resolution does not agree with agents of task;
    I've made some tests depending on what assignment task has:
    1. When it is a general task, work item was created for a workflow initiator even though rule failed to determine an agent.
    2. When it is a task with general forwarding with assigned position(s), which rule will never determine, work item was created for holder(s) of that position(s).
    3. When it is a task with general forwarding with no assignments, workflow could not determine an agent as expected.
    I've also debugged functional module for that rule and it determines appropriate agent but then do some check with the help of RH_TASK_AGENT_CHECK function and returns an error.
    Can someone help me with this problem? Is it some standard expected behavior or not?
    Maybe something wrong with the org. plan?
    All answers are appreciated.
    Thanks in advance,
    Alex.

    Hello Rick and Eddie.
    I've tried to assign user directly instead of position to a task with no help. I get the same result.
    I've tried to set a task as a general task and made the rule to fail if there is no resolution and it fails.
    I've tried to assign position or user directly to activity in a workflow and it does work but that's not what I need in my scenario.
    As I said earlier I've tried to debug that rule invoked from a workflow. I will post some screenshots for you.
    I set a task as a general task and assigned rule 10000162 (ABBR="PARTNER_1", Name="Employees for responsible org. unit") to activity step in a workflow and here is what I get:
    1. Function CRM_ORGMAN_ORGOBJECTS_FIND_2 gets called by the rule and resp. sales org. unit is passed there ([screenshot1|http://www.picdrop.net/?v=debug1.png])
    2. Next function CRM_ORGUNIT_GETEMPLOYEES gets called passing id of a resp. sales org.unit without a type.
    3. Next RH_STRUC_GET gets called and returns result table with position and central person for that position ([screenshot2|http://www.picdrop.net/?v=debug2.png])
    4. In the end of CRM_ORGMAN_ORGOBJECTS_FIND_2 function only central person in inserted to the actor_tab ([screenshot3|http://www.picdrop.net/?v=debug3.png])
    5. After CRM_ORGMAN_ORGOBJECTS_FIND_2 ends we appear in a RH_GET_ACTORS function where we can see that agent check is performed if act_task is not initial. I assume that check is not performed if we do a simulation of a rule ([screenshot4|http://www.picdrop.net/?v=debug4.png])
    6. Then RH_TASK_AGENT_CHECK function gets called for every record in a actor_tab. In out particular case it's one record. ([screenshot5|http://www.picdrop.net/?v=debug5.png])
    7. Inside that function checks act_wi_id (activity work item id?) if it's initial and get exluded agents. It is initial in my case ([screenshot6|http://www.picdrop.net/?v=debug6.png])
    8. Then function tries to read table with keys equal to type and id of found agent and errors there, perhaps because there is no record in that table ([screenshot7|http://www.picdrop.net/?v=debug7.png])
    That error results in overall agent determination failure.
    Hope this screenshots will help to identify a problem.
    Why read table results in an error and because of that all rule fails?
    Regards,
    Alex.

  • Agent Determination Organizational Data

    Hi Experts,
    Good Day!
    I would like to ask some help regarding a workflow the problem is the "user received the workitem however user claimed that he is not supposed to receive"  that is why i would like to know who are the agents dedicated for these tasks. we are able to find the step it is a user decision where the agent is the Rule "0090010" for purchasing group. In transaction PFAC we entered the rule "0090010" the information regarding the rule below:
    Transaction: PFAC
    Rule Display:
          Basic data:
                   Abbr: Purch. group
                   Name: Purchasing Group
    Rule Definition:
          Category: Agent Determination: Organizational Data
          OrgObj type: T024
    We would like to know:
    1. How does it determine the Agent who is supposed to receive mail using the "Category: Agent Determination: Organizational Data"? Where can we find the agent that is configured on the workflow using the rule?
    2.Is there a standard rule for agent determination: Organizational Data  for this workflow?
    Answer's will be a great help.
    ~Thank You,
    Junne Ray

    got it now! sorry, i am a bit dumb today.
    o.k. here is what you have to check:
    transaction PFOM - relationship between the purchasing group (which will be the one of the PO and therefore and object of table T024) and your organizational structure. check the relationship.
    documentation:
    Data basis for role resolution
    For role resolution, the link between the objects of type
    T024 (individual purchasing groups) and the organization
    objects (position, organizational unit, ...) is evaluated.
    Required settings and Customizing
    The linkages between the various purchasing groups and the relevant
    organizational objects must first be maintained using
    transaction PFOM.
    Procedure for errors
    If the role resolution delivers no result, the work item for which the
    role resolution was carried out is not faulty but addressed to all
    possible processors (flag "abend in role resolution without result"
    is not set).

  • Agent determination in price variance workflow

    Hi all,
    I am facing some problem in workflow, can any one help me.
    for determing the agent in case of price variance in invoice we are using the rule 009000010(object type T024 is assigned). Can any one tell me how this determines the agent based on purchase group?
    now we have a requirement to change the behavior of determining the agent. If the Purchase order is crated by the temporary user(we have some temporary users), the agent determination should be like standard (like 009000010 rule), and for all other users we have to assign the agent name as same as user name.
    now for solving this i am planning to create a new rule of type "F"(Agent determination :function to be executed) and assigning a new function module.
    Function module will have two import parameters "puthcase group" "purchase order number". Using the purchase order number i will get the user, after that i will find the user type. If the user is temprory i have to determine the agent like standard way (like rule 009000010(object typeT024). Can any one please tell me how the rule 009000010 will determine the agent for the purchase group.
    Thanks & Regards,
    Raghu

    That rule is not available in the sandbox system I have access to, so it can't be a basic rule. Either it is customer-specific, or it belongs to some industry solution or add-on package.
    Generic advice: why don't you simply investigate how this rule solves its task? You can even copy it as a starting point for your own rule.

  • Agent Determination - PR Item Release

    Hi All,
    I'm trying to set up standard workflow WS00000038 for purchase requisition release notifications.  I'm having a problem with determining the correct agents.  I receive the following error in the log when the workflow runs:
    Agent determination for step '0000000003' failed
    Error in resolution of rule 'AC00000148' for step '0000000003'
    I am using standard task TS00007986, and rule 00000148.  The configuration for the release procedure is complete and working.  I have maintained values for users in T16FW, and set the release codes to '1' for workflow.  When I try simulating rule 148 in PFAC, I see that it is pulling from table T161E - and the only release code maintained there is a default 01 in german.  I tried creating a custom rule that referenced T16FW, but the simulation failed for it as well.
    I am very new to workflow.  What do I need to do in order to have this event notify the correct user defined in customizing? 
    Thanks,
    J

    Hi,
    The entries in table T16FW are made via customizing for the PR release.  View V_T16FW is empty... I tried entering manually through SE16 and saving, but it would be blank if I looked at it again. 
    However, I don't know if that is the problem.  I cannot get the rule to determine an agent in PFAC.  Currently I have modified rule 00000148 to have the container ReleaseCode look at table T16FW, field FRGCO.  It is also still getting requisition from BUS2009.  When I simulate in PFAC, I cannot get an agent to be determined. 
    T16FW contains a link to usernames which are maintained.  Why is this rule not determining an agent during simulation?  
    Thanks

  • Agent Determination in Workflow

    Hi,
    I am implementing a workflow for change in basic pay, the problem is i am not clear how to go about agent determination,  i need to follow my organizational structure but not completely like its not like the complete hierarchy. I need ideas, and some what how to go about it.
    Thanks.
    Khusro Habib

    Hi,
    Do you know who should be notified of the change in Basic Pay? is it the Employee's supervisor? If it is the Supervisor.. create a method.. In the method start off with the Employee's PERNR.. Grab the position from infotype 0001.. look up HRP1001 subty B002 to see who this position reports to.. you will now have the supervisor's position in HRP1001-SOBID.. do another look up on HRP1001 SUBTY A008 to get the pernr of the supervisor in HRP1001-SOBID.. got infotype 0105 SUBTY 0001 to obtain the User id of the supervisor.. notify the supervisor of the chnage in Basic Pay...
    Hope this helps..
    Suresh Datti

  • Agent Determination Rule Not Working

    I have created an new agent determination rule in PFAC.
    The category I used is "Agent Determination: Responsibilities".
    I have also selected the "Terminate if Rule Resolution has no Result" option.
    The container has one element in it which is NOT mandatory called "Clinic".
    I have set up the responsibilities, where there is only one which catches all - In other words, I created a responsibility for Clinic "*". I have also assigned a position as a responsible agent. The position is linked to a person number, and the person has a user-name assigned - All are in the valid period.
    If I test the rule, and do not enter anything for the Clinic, and click the test button, it returns my one agent, which is correct.
    The problem is that in my workflow I have assigned the rule as a responsible agent. At runtime, the workflow falls over saying that the agent determination has failed. This does not make sense, since I have not passed anything in binding to the rule. As mentioned earlier, when testing it works fine. I have tried using the rule with and without binding but it wont work. If I change the step in the workflow to rather use  position, it works.
    Please let me know if you have any ideas - I am really battling with this strange problem.

    I tried deselecting "Terminate if Rule Resolution has no Result" in the rule definition.
    Having done that, the workflow now works correctly - It actually DOES find an agent and the workflow goes on as expected.
    This is really weird, because if the terminate option is selected, it falls over saying that no person was found. Now with the terminate option not selected, it finds the agent - Is this a bug, or am I misunderstanding something???

  • Runtime Agent Determination

    Hi
    Still having problems with my workflows.
    I need to get agents from a Ztable at runtime. I have gone through this blog entry :/people/ravishankar.rajan/blog/2006/12/26/agent-determination-in-workflow-using-custom-table
    I have ztable with user names and their managers.
    I have attached this workflow to the customer Master. Created an entry related to DEBI ni change documents
    I have created a copy of the zsystem and made a method- Get agent-
    This is my code for the method
    begin_method get_manager changing container.
    data:
          actuallyprocby type wfsyst-act_agent,
          appl type zagents-applt,
          mngr type zagents-manager.
      swc_get_element container 'ActuallyProcBy' actuallyprocby.
      swc_get_element container 'Appl' appl.
    clear mngr.
    select single manager from zagents into mngr
    where agent = actuallyprocby and applt = appl.
    concatenate 'US' mngr into mngr.
      swc_set_element container 'Mngr' mngr.
    end_method.
    In the container of the task i have placed the import parameters- actuallyprocby and appl
    these are passed during the binding
    according to the tutorial, i can pass parameters that way, create the parameters in the method and use it to retrieve the manager of a user.
    finally i set the element in the container to the returned value -
    the breakpoint i use doesnt get activated
    and finally---
    the workflow stops at this task with the status ready and with no agent assigned.
    How to pass the parameters properly and resolve this issue
    Thank you all very much
    Points will be rewarded
    Regards.
    Edited by: Zeeshan Shah on Apr 14, 2008 4:03 PM
    I have checked the tech details for the workflow in my outbox
    ---error
    Result of agent resolution does not agree with agents of task
    This error goes on the first activity-- i have used expression: initiator at it--

    Hi Zeeshan,
    I think the question is still not solved.
    I have implemnetd a scenario exatcly like this but there I have implemented a RULE.
    The method that you have created is exactly correct.
    But there is a simple thing that you need to implement more.
    As per the method,
    begin_method get_manager changing container.
    data:
    actuallyprocby type wfsyst-act_agent,
    appl type zagents-applt,
    mngr type zagents-manager.
    swc_get_element container 'ActuallyProcBy' actuallyprocby.
    swc_get_element container 'Appl' appl.
    clear mngr.
    select single manager from zagents into mngr
    where agent = actuallyprocby and applt = appl.
    concatenate 'US' mngr into mngr.
    swc_set_element container 'Mngr' mngr.
    end_method.
    When you are passing the workflow initiator here, the workflow initiator will have the value like USADAPTARY. Here you have to seperate the US value. So from here you have to remove the value of US from the actuallyprocby and appl variables. Then only the select will work. Here I am assming that the table does not contain the US with the agent ID.
    After that you have to call the method into a task with a custome task container element like that of the Workflow initiator. The value that the method would return map it to the custom variable of the task container.
    Now, in the workflow container also, create another element with the same type like that of the workflow initiator. Get the task within an activity with background properties and in the Misc. Priority as 1.
    That activity will get the name of the ActuallyProcBy and Appl and give the name of the agent with the word US added into the custom variable like that of the workflow initiator.
    Pass that variable in the activity that you like to do, with the agent assignment properly for that activity and for the agent assignment choos the User and the variable name of the workflow container like that of the workflow initiator.
    Please reply if this does not work.
    Rewards points if found useful.
    Regards.
    Abhijit.

Maybe you are looking for