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.

Similar Messages

  • Agent determination issue with no error, cant use SWPR?

    Hello gurus.
    We currently have 81 invoices that have workflow status "in process". However, the last line of this status is "agent determination issue". I've assigned the appropriate user in PFOM and i want to restart the workflow item, but i cannot use SWPR.
    Normally it should be in error and you can use SWPR, and that fixes everything- however why is the workflow still "in process" and not in error? and how can i complete the workflow item now that the agent has been assigned? do i just create a new workflow using SWUE and delete the old one? Many thanks.

    Hi,
    OK then try like this , as you said you do not have authorizations to SWI1_RULE right so do teh below steps,
    1. Execute SE37 and execute the fucntion module ALINK_CALL_TRANSACTION.
    2. Now mention the txn name as SWI1_RULE.
    3. Now you should be able to see teh initial screen of the txn.
    4. Now enter teh workitem ID which is in ready state not the top workitem ID, the workitem for which the agent is not assigned. Click F8.
    5. Now choose that workitem ID and click CTRL + SHIFT + F11.
    it should re evalutae the agents, if this is also not determing then make a note of the RULE ID from activity step and open the txn by using the above function module and try to simulate the rule or please let us know what is the rule type.
    Regards
    Pavan

  • Agent determination issue

    Hello Experts,
      We have developed one custom workflow a year back and last two months we are seeing the issue with Agent Determination randomly.  We created a position with 3 users and assigned the Position to the Agent Assignment.  Some times the work item sent to other users other than 3 users assigned to the position.  We are not able to trace it, why it's behaving like this.  Any help would be appreciated.
    with best regards
    K. Mohan Reddy

    If this happens randomely then we can only assume
    Please check the wflow log from SWIA whether someone has forwarded the workitem?
    There can be also change in Position assignment, Substitute getting maintained.
    Also check whether the users are maintained in the Task level if it is General forwarding Not allowed task from the task attribute.
    Thanks
    Arghadip

  • 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 failed in Standard Workflow.

    Hi Experts,
    I am new to workflow and we are trying to implement the standard HCM process of Transfer.
    The worflow is giving this error.
    Error when processing node "000000032"
    which further says Agent determination failed for step "000000032"
    Pls help and guide what can be done to resolve it.
    We have checked the Org Structure.
    Regards,
    SV

    Hi,
    Thank you for your reply,
    Which std workflow you are using ?
    We are using the WF WS17900427.
    Are you using portal to trigger the workflow and webdynpro screen for approval or adobe form for approval ?
    Yes
    If the agend resolution is getting failed. What role number ?
    Rule ID 17900012.
    Have your tested individually from PFAC t-code. Is it giving the correct agent from there. check from there.
    Testing individually (onclick of Stimulate rule resolution).
    Runtime Error MOVE_CAST_ERROR
    Exception     CX_SY_MOVE_CAST_ERROR
    Regards,
    Sanjyoti.

  • Wrong Agent Determination in Shopping cart Workflow

    Hi All,
    I am having problem in shopping cart workflow.
    If we create shopping cart with 15 or more line items then Approval is going to wrong line item cost object owner. However if we create shopping cart with 14 line items then it showing correct financial Approver. Even we raised one more shopping cart with value similar to 15 line items shopping cart and it also going to correct Approver.

    After 2 days of debugging i found where is the problem. I am explaing this below.
    First i created 2 Shopping cart. First one has 14 Line item which shows correct Agent.
                                                  2nd one has 15 Line item which shows wrong Agent.
            CALL METHOD l_o_pdo_sc->get_item_detail
              EXPORTING
                iv_item_guid = l_r_item_guid->guid
              IMPORTING
                et_item      = l_i_item_i
                et_account   = l_i_account_i
    *MOD-002:Begin
                et_limit     =   l_i_limit_i.
            APPEND LINES OF: l_i_limit_i TO l_i_limit.
            APPEND LINES OF: l_i_item_i TO l_i_item,
                                           l_i_account_i TO l_i_account.
    Case for First SC.
    l_i_account_i  has value of Line Items. First line item suppose 1L.
    After appending the l_i_account(2nd itab) has also first .line item 1L.
    Case for 2nd one.
    l_i_account has value of Line Items. First line item 1L.
    But after appending the l_i_account has no first line item 1L.
    Please give some solution to this problem.

  • Use HR Structure for Agent Determination in Shopping Cart Workflow SRM7.0

    We are implementing a Shopping Cart Approval Workflow in SRM 7.0. The process is that the Requester creates a Shopping Cart and an approval process will take effect.
    The approvers will come from an HR structure wherein the direct superior (or supervisor) is the first approver. The second approver is the direct superior of the first approver; and so on, until the Shopping Cart is approved. A maximum of 7 approvals can be done in a Shopping Cart document.
    I would like to ask the following:
    1. How can I achieve this in our WF? I tried to implement BADI /SAPSRM/BD_WF_RESP_RESOLVER but I was not able to activate it (there are other active implementations for this in Shopping Cart).
    2. If there are other suggestions on how to accomplish this, please let me know.
    Thanks in advance for your help.

    Thanks Masa.
    We created 2 custom expression for our requirement and copied FM /SAPSRM/WF_BRF_0EXP001 to put values on those expressions. Then, on our BRF we compared these 2 expressions. After putting the Eval. ID on the process level configurations, we were able to see in SLG1 that the fields are populated correctly. However, we just put constant values on the custom expressions so we can proceed with testing.
    There is one problem in terms of populating the other custom expression. This expression is for the Level of the Manager. I understand that this custom expression is populated before RR_MANAGER_OF_MANAGER. I would like to understand how to get the next approver in the copy of FM /SAPSRM/WF_BRF_0EXP001. In this way, I can get the Manager Level from table HRP5581 and use this to compare with the Release Strategy. If this will not work, is there a way to get the work item ID for the WF so I could get the previous approver then get the superior of the that previous approver and then get the Manager Level from there?
    Currently, only the GUID and Object Type is populated in the FM. Can I reuse some of the fields from other expressions so I can achieve my requirement?
    Thank you very much for your help.

  • 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

  • Agent determination best practices

    Hi, workflow dev team!
    Another question about workflow best practices.
    I build a workflow, the first step of each workflow, at least as I see it, is to determine agents for all steps in the workflow and store it in multiline WF-container. After that, to use this WF-container data to execute a step inside of workflow.
    The questions are:
    1. Suppose, I filled a WF-container with a list of all possible agents and their position (in order to supply more user-friendly approve/decline notifications) for the different steps inside of this workflow (username & position). As I understand, I can access to specific line of multiline container with &AGENTS[&INDEX&]& inside of EXPRESSION field (not via ABAP-code in method of class), but how can I access specific column of the WF-container? E.g. &AGENTS[1]& will return «USJOHN — Junior Manager», is it possible to retrieve username and position from multi line and pass it to the task as two separate container elements?
    2. Is it possible to query specific line of multiline container element according to some logical condition inside of EXPRESSION field (not via ABAP-code in method of class) or in order to do this I have to implement that logic inside of ABAP class method?
    And the last question, probably, less connected to the questions asked above.
    3. If I need to define agents for the task, what is the best approach to do that:
    — define the task as General Task and insert the relevant agents as multiline container element via EXPRESSION field;
    — to play with Agent Assignment (try to implement agent determination logic there) and not to define the task as general one.
    Thanks.

    Ronen already had great input, but here are some additional points:
    -In general I would try to avoid some kind of "Let's get all the agents at the beginning of the workflow into a multiline container, and try to pick up the correct ones for the individual steps" approach. Of course if your aim is just to display the list of agents somewhere (task description etc.,), then this might be OK approach.
    -Rules are better than expressions in agent determination (at least in most cases). If the approvers change during the process, you can (as an WF admin) just click the "Execute agent rule again" functionality, and the system will find the correct new approver for the work item. Otherwise you need to go to manipulate the container element(s) (and first figure out that who is the approver).
    Answer for 3: You don't need to use only expressions/container elements. Try to check if you can use rules. In some rare cases you might consider of using the tasks' agent assignment (the same place where you set the task as general task). Let's say that you want to send the work item to all users that have certain authorization role. Now you can set the role as a "restricting entity" at the task level (=same place where you set the general task). This will mean that only the users who have the role are the possible agents for the task. And now if you leave the agent determination part at the workflow template empty (no expressions, no rules etc), you are done!
    Regards,
    Karri

  • HCM F&P:Agent determination  without Rule 17900012 .

    Hi experts,
    I am doing TRANSFER process. In my workflow , I am using Rule 17900012 for agent determination . So the workflow is executing successfully.
    Now I dont want to use that rule. Instead I tried to give the variable as the EXPRESSION for agent. But then that task is not appearing in Universal Worklist and I checked  the Workflow Log, the Wok Item is in READY status. And it is not allowing to execute the item saying 'WORK item couldnt be found.
    Is there any restriction like we should maintain the Rule 17900012 to get the task  in the UWL?

    Hi
    Try with
    Expression = &_WF_INITIATOR&
    Kind Regards,
    Mukesh

  • 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 for workflow

    Hi everyone,
    I have a classic issue: I'm trying to assign a workflow task to an agent. The agent should be determined from the container element "APPROVER". In the task I've entered the expression &APPROVER&; however, I'm receiving error "Agent determintaion for step 4 failed..." "Result of agent determination does not agree with agents of task". And, yes, I've made sure the APPROVER element is of type Import and has a proper value.
    I don't get this; I thought setting the agent to the value of the container element should do the job? After all, the container element "APPROVER" comes up in the F4 search help under the Decision tab of the task... what's wrong here?
    The WF works fine if I set the "WF_Initiator" as the agent, however. But, this is a bit limiting in the long run...
    Regards,
    Trond

    Hi Ravi,
    this is what I actually did... but I found another post, with a reply from Ramki Maley, advising me to make the APPROVER of type SWHACTOR. That helped!
    Thanks anyway,
    Trond

  • PR Overall Release Workflow - Agents Determination Failed

    Dear All WF Experts,
    I have used the standard workflow WS20000077 for PR Overall Release. I have assigned the agents to the task TS20000159 by position maintained in the Workflow Organizational Management Structure. The agents' names are showing correctly in the task's agent settings.
    However,  when I execute the workflow, the error 'Agent Determination Failed' for that step (TS20000159). I have checked the agent settings in workflow and SPRO, they look fine. Could anyone please kindly give me advices how to solve this error? Thank you so much.

    Hi, to all the experts who have helped me all these while,
    Thank you very much for spending time helping me to go through this issue.
    Yesterday, I ran through the coding for the function module for the rule AC20000026 again. I found out that there is one part of the coding which is causing the failure of determining an agent. The code disregard the company code for overall release of Purchase Requisition while the business requirement involves company codes in every PR created. Thus, by changing that code, the problem is solved.
    The snippet of code of function module (ME_REL_GET_RESPONSIBLE):
       CASE t16fc-frgwf.
    * keine Ermittlung
          WHEN space.
            RAISE nobody_found.
    * Ermittlung ¨¹ber T16fW
          WHEN '1'.
            IF eban-gsfrg EQ space.
    *     Einzelpositionsfreigabe Banf
              SELECT SINGLE * FROM t16fw WHERE frggr = eban-frggr
                                           AND frgco = rm06b-frgab
                                           AND werks = eban-werks.
            ELSE.
    *     Gesamtfreigabe Banf
              SELECT SINGLE * FROM t16fw WHERE frggr = eban-frggr
                                           AND frgco = rm06b-frgab
                                           AND werks = space.
    There is always a value in werks in my business scenario...
    SELECT SINGLE * FROM t16fw WHERE frggr = eban-frggr
                                           AND frgco = rm06b-frgab
                                           AND werks = space.
    So, by changing it to
    AND werks = eban-werks
    it will work, however, I think it's better to just remove the If statement
    IF eban-gsfrg EQ space.
    , since it has no effect anymore.
    I hope this would give a hint to all the rest who might be facing the same problem as well.
    Thank you very much,
    YL

  • Agent determination for step 0000000081 failed error in workflow

    Hello All,
         I am doing employment verification from ESS portal. In the workflow step I have selected RULE to determine the agent. To configure rule, I double click on rule, on next screen selected "Agent determination - responsibilties" to determine the agent. I configured responsibilties with the valid value ranges and everything but the workflow is going into error! I did research and not sure what I am doing wrong. I checked the workflow container in workflow log and all the values that are supposed to pass to rule container are showing up fine.I keep getting the error:
    Agent determination for step 0000000081 failed
    Result og agent resolution does not agree with agents of task.
    Any feedback you could provide would be greatly appreciated.
    Thanks.
    Mithun

    1. In Transaction PFTC, select Task Type = Standard Task and Task = 01000076
    2. display the task details.
    3. Now go to Additional data ->Agents Assignment->Maintain
    4. Select the task here and click Attributes in the application tool bar.
    5. Select the General Task radio button and hit transfer.
    -- You have made your task general.
    To Synchronise the runtime buffer ,simply excute T-Code SWU_OBUF and hit the Start Synchronization button.

  • 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

Maybe you are looking for

  • How can i sync my iphone with itunes without erasing its data?

    my computer crashed and i had to reinstall my windows,now i want to sync my iphone with the new itunes(with the same apple id) but it says all data should be erased from the device....is there some way to sync the iphone without the data being erased

  • Trying to wrap text around image causes table to break out of wrapper?

    Hi, I'm not sure if this is a CSS/HTML problem or just something with Dreamweaver CS3? Here is what I have My pages have a wrapper with the following attributes #wrapper { width: 800px; margin-right: auto; margin-left: auto; font-family: Arial, Helve

  • Field symbols in loop

    Hi, I need to change this code using Field symbols. Can anybody help me?   DATA: i_history  TYPE STANDARD TABLE OF mmreq_history INITIAL SIZE 0,         wa_history TYPE mmreq_history,         l_menge    LIKE eban-menge.     LOOP AT i_history INTO wa_

  • Problems with Citrix ICA Client

    Guys, To work from home, my employee provides web access using Citrix ICA Client. I used to log into a given web page, type my ID, fixed pasword and a 'token' password, and when I clicked the option I wanted, it opened the Citrix client and all worke

  • Can I use a WiFi extender like Netgear wn3000rp or Mcrepeater with Time Capsule (first generation)?

    I want to securely extend my network to improve strength of signal in the basement, where I have an Apple TV. Now signal strength is 4 (out of 5), but have had some problems streaming from Netflix.