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

Agent Determination Rule using Function Module

Former Member
0 Likes
2,660

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
Former Member
0 Likes

Hi,

Is your task defined as a General Task?

Regards,

Former Member
0 Likes

Hi Arghadhip and Enrique,

Thanks for ur responses.

I am using the Standard Approve Form Task (TS17900101)

How do I check if its a General Task. Should I copy the task instead of using the standard task directly?

Regards,

Raju

Former Member
0 Likes

edit your task in PFTC change mode

In menu option additional data->agent assignment -> maintain

Also please check the binding from Rule to your Workflow.