cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Agent Determination Rule using Function Module

Former Member
0 Likes
2,657

Hi all,

I am trying to create a custom agent determination rule using function module. But my rule is not getting invoked when the workflow is executed.

I created a custom rule and linked my function module (with proper signature).

FUNCTION 'ZRULEXXX''

""Local Interface:

*" TABLES

*" AC_CONTAINER STRUCTURE SWCONT

*" ACTOR_TAB STRUCTURE SWHACTOR

*" EXCEPTIONS

*" NOBODY_FOUND

And I am hard coding some values into table ACTOR_TAB

********************************************************************

REFRESH ACTOR_TAB.

CLEAR ACTOR_TAB.

IF SY-SUBRC NE 0.

RAISE NOBODY_FOUND.

ELSE.

ACTOR_TAB-OTYPE = 'US'.

ACTOR_TAB-OBJID = 'XXXX'.

APPEND ACTOR_TAB.

ACTOR_TAB-OTYPE = 'US'.

ACTOR_TAB-OBJID = 'XXXXXX'.

APPEND ACTOR_TAB.

ENDIF.

********************************************************************

But a worklist item is not being created for the users appended to ACTOR_TAB.

Is there anything am missing. Please let me know.

Thanks in advance

Regards

Raju

View Entire Topic
saumya_govil
Active Contributor
0 Likes

Hi Raju,

Try to simulate the rule independenty and check if the values are returned orrectly in the ACTOR_TAB table.

Also check if you have linked the rule in the workflow task to fetch the agents.

Regards,

Saumya

Former Member
0 Likes

Hi Sowmya.

I have tested the rule seaprately. It gives me the list of agents succesfully.

I have also verified that the rule has been linked to the workflow task.

But still workitem are not being generated.

I tried debugging the function module, but the control does not go to my FM.

Please let me know if I am missing something else.

Thanks a lot for ur reply.

Former Member
0 Likes

I hope the binding is properly done from Workflow to Rule container. I will also request yoy to check whether the Task is classified as General task.

Thanks

Arghadip