cancel
Showing results for 
Search instead for 
Did you mean: 

Rule in workflow task not assigning agent

12-20-2015 9:34 PM
4977 views 36 comments
0 Likes
SAP Managed Tags
Subscribe

All,

I have created a rule to determinate the agent for a task.

I have assigned it to a function to be executed,

The function module has the correct input parameters.




and before implementig the logic that determines the agent, I have assigned it to my user as shown below.

But its not working, every time that I create a trip ( with another user ) I do not receive messages in my inbox to approve the trip. I don't know if something is missing or if i have to refresh some buffers.

Thanks and Regards

Jon

0 Likes

Accepted Solutions (0)

Answers (3)

Answers (3)

pokrakam
Active Contributor
0 Likes

Hi Jon,

are you a possible agent of the task? If in doubt, make it a general task and try again (Run SWU_OBUF first).

Regards,

Mike

Former Member
0 Likes

Hi Jon,

please simulate the rule once and check the rule result by passing the required import parameters.

Thanks & Regards,

Pramodh.M

tapomay_sanyal
Participant
0 Likes

Hi Jon,

Kindly check your binding parameters first as this is important for your rule function module to return proper agent, to verify whether you code inside function module is proper or not you can pass the relevant values(based on the binding ) in PFAC and check the result by simulating the rule.

If you perform theses steps and yet the problem persists, do inform.

----BR----

Tapomay

Former Member
0 Likes

Hi Prahmod,

I have simulated it on PFAC and it works.

Regards

Former Member
0 Likes

Hi Tapumay,


I have simulated it on PFAC and it works.


Regards

tapomay_sanyal
Participant
0 Likes

Hi Jon,

Thus it means your code inside the function module is proper, kindly check the binding in rule .

Whether all values are passed to the rule for agent determination or not.

---BR----

Tapomay

Former Member
0 Likes

Hi Tapomay,

Its true but what I mean is that the agent is being assigned directly, there are no inbound values that determine the responsible agent, so in theory I should have the agent assigned. No?

Regards

tapomay_sanyal
Participant
0 Likes

Hi Jon ,

Yes agree , but your screen shot above shows your rule has binding !

Otherwise if there's no value passed to rule then binding is normally in white  and withing brackets instead of exists it shows Does not exist.

Methodology is same for both, populate actor tab.

ANd also rule assigned in 90000004 whereas next screen it shows 90000003 ....

Kindly check this.

----BR----

Tapomay

Former Member
0 Likes

OK, last question, do i have to map the binding from the rule to the workflow container o i just have to fill the actor tab?

tapomay_sanyal
Participant
0 Likes

Hi Jon,

No pass the values from workflow container to downwards to rule container.

after your business logic execution populate ACTOR_TAB properly.

Kindly do ask further questions in case problem persists

---BR----

Tapomay

Kindly close the thread if you got your answer.

Former Member
0 Likes

Hello,

Did You set agent assignment for Your task?

"Control" tab in Your task -> Task Properties -> Agent assignment

You can check this also in WF log?

If there will be something wrong with the agent assignment You should get error message in detail technical log like "Result of agent resolution does not agree with agents of task".

br,

artur

Former Member
0 Likes

Hi Tapomay,

I have seen that the value of the binding is "travelling" well to the rule and that the new value for the approver is being retrieved. I write in a Z table in the FM if the approver is found so i think that something else is missing.

Any idea?

Regards

Jon

tapomay_sanyal
Participant
0 Likes

Hi John,

Kindly show the step and rule in a screen shot

If agent assignment is done properly there should be a yellow icon .

Diagnosis :----

STEP A: Step(Task----) agent assignment properly done.

STEP B: Binding

STEP C: Business logic in Function module

Step B & C you have already verified

Another question :

If you are not receiving the work item then to whom the work item is forwarded to?

----BR----

Tapomay

Former Member
0 Likes

Is it enough?

Thanks a lot.

Regards

Former Member
0 Likes

Hi, 

It looks ok.

You can check wf technical log for case where it can't find agent - for this step or the step before.

br,

artur

tapomay_sanyal
Participant
0 Likes

Hi John,

Everything looks fine,

Kindly state the question i asked :

doubt is in function module code did you use WF_INITIATOR to assign? or your user id directly?

If it going into error altogether or when you are creating trip is it going to some other user id?

-----BR---

Tapomay

Former Member
0 Likes

I am creating trips with another employee number but im my SAP session, I may try to ask someone to create a trip. What do you think?

Former Member
0 Likes

Hello,

If You're creating this for someone else are You sure this user name exists in SAP system ?

Can You hardcode this for testing and put there Your UNAME ?

You will know if FM works,

be,

artur

Former Member
0 Likes

Yes i know he exists, all the data i am using is ok.

tapomay_sanyal
Participant
0 Likes

Hi Jon,

My question was,

what you mean by passing my user name?

if you pass WF_INITIATOR then if you create the trip with other ID then your rule FM would return that user ID as AGENT instead of you.

If you want to receive the work item irrespective of any case, then try hard code your user ID(just for test) then create trip from other user ID then you should receive the work item.

hope I am clear

---BR---

Tapomay

Former Member
0 Likes

Anything in workflow log?

Technical details ... ?

br,

artur

Former Member
0 Likes

Yes i understood it, i have hardcoded it and it does now assign it to me.

Regards

tapomay_sanyal
Participant
0 Likes

Hi Jon,

Perfect !

Kindly mark the thread close if you got your answer

---BR---

Tapomay

Former Member
0 Likes

Sorry Tapomay, I mean that it does not assign it to me....

tapomay_sanyal
Participant
0 Likes

Hi jon,

to whom it is sent to?is it in error?

Former Member
0 Likes

its not being sent to no one, in the log it indicates that everybody can execute the task, i attach the technical log:

tapomay_sanyal
Participant
0 Likes

Hi Jon,

The task TS20000131 determines its agent via role resolution as per documentation.

Kindly check the documentation:

Standard Task TS20000131 (Approve Trip Facts) - Archiving Application Data (FI) - SAP Library

This may be an issues, as the user you are using may not be a under you as per ORG structure,

in case both are same i.e. INITIATOR & approver it is working!! so need to check how this standard task behaves in custom workflow(which is the case here).

https://help.sap.com/saphelp_46c/helpdata/en/96/aef837aea75351e10000009b38f8cf/content.htm

Consider this as a possibility as you have already exhausted probable common pitfalls.

---BR----

Tapomay

Former Member
0 Likes

OK, thanks so I will try to create a new task on which i will set the same configuration as here.

Thank you so much Tapomay, we keep in touch.

Regards and many thanks!!

Former Member
0 Likes

Hi Tapomay,

One question, I have copied the standard WF and I have generated new task also as copy of standard. If I do the same as before ( i mean assign the rule ) it behaves as it used to. So do i have to create a new WF from the beginning?

Regards

tapomay_sanyal
Participant
0 Likes

Hi Jon,

Is the particular task following the behavior suggested ? i mean is that depends on ROLE?

unfortunately even in case of copy it will behave as same.

---BR----

Tapomay

Former Member
0 Likes

It seems that yes, so i may have to create a new task from 0 to avoid this behaviour.

Former Member
0 Likes

It Works:D

tapomay_sanyal
Participant
0 Likes

Hi Jon

Happy to hear that works

Eager to know what you did? created a custom task from ground zero ?

---BR----

Tapomay

Former Member
0 Likes

Yes that's it, I created a new workflow template and added my custom tasks manually, so you were right.

Regards

anjan_paul
Active Contributor
0 Likes

Hi,

  Before append to actor_tab, concatenete 'US' with wa_actor into wa_actor. Then append it

Former Member
0 Likes

Hi Anjan,

I do not understand what you mean, I have added the US in the otype and the user in the objid parameter of the structure.

Regards