cancel
Showing results for 
Search instead for 
Did you mean: 

How to redetermine work flow agents

Phani_Kumar
Participant
0 Kudos

Dear Experts,

I would like to redetermine work flow agents of a dialog task ,whenever there is a change of users on a position or whenever there is any change in org.hierarchy .

I have created an event in the header section -- > version dependent -- > events -- > "Recalculate rules of active work items" . But I am not sure how to trigger this class event ?

I have tried to use BADI - HRBAS00INFTY , and in the IN_UPDATE Method of BADI, i tried to raise this event . But it is not working that way . Can someone shed light on how to raise or trigger this event or how to re determine work flow agents

jocelyn.dart , anjan.paul I have seen your post on something similar, but couldn't get an idea on how to trigger this event . Please assist me in this regard . Thank you

Accepted Solutions (1)

Accepted Solutions (1)

sbl
Active Contributor
0 Kudos

Hi,

SWI1_RULE updates the agent determination of the active work item from the task mentionned in the variant.

so it can easily do the job.

Now if you want to trigger it right when there is change in the org structure you can but what I have observed in my project is that an update every day or twice per day is largely enough

Cheers

Stephane

Phani_Kumar
Participant
0 Kudos

Seems an Excellent solution for me ... Thank you very much sbl

Will implement and let you know ...!!!

Phani_Kumar
Participant
0 Kudos

Hello Stéphane Bailleul

May I know how you are submitting the program in background? because , we need to click on the button "Execute Agent Rules" standard tool bar button. I am not able to submit the program with that toolbar button. Can you please guide me how to do that?

As of now, I have fetched work items,and wrote the same logic of button - "Execute Agents Rules" . It's working , But I would like to learn the easiest way you were suggesting me.

sbl
Active Contributor
0 Kudos

Hi

I think you are unfortunately right (I mixed up with a job for SWPR)

A quick solution could be to make a report where you go through table SWWUSERWI (table conatining the dialog work item still active with the task number) and for each entry you run the function module SAP_WAPI_ADM_WORKITEM_REDORULE.

Then you can run that in back ground

Sorry for the mistake

Stephane

Answers (2)

Answers (2)

anjan_paul
Active Contributor
0 Kudos

Hi,

At the time of triggering the event just check that is called or not. Then check did you properly trigger the event or not.

Thanks.

sbl
Active Contributor
0 Kudos

Hi,

Are you using a rule for the determination of the agent ?

If yes then why don"t you simply make a variant for SWI1_RULE and then run it in a job (prog RSWIWILS)

Cheers

Stephane

Phani_Kumar
Participant
0 Kudos

Hi sbl ,

Thanks a lot for bringing new idea . I didn't think of this...

For us ,Org structure may change frequently . So is it the best solution?

If yes, do we need to submit this program ,, in the badi of org structure(HRBAS00INFTY) ?

In this BADI, we need to fetch all active items of the work flow and then give all the active work items to this program right?

Please suggest and correct me if i am going wrong in understanding