Skip to Content
0
Sep 23, 2008 at 08:43 AM

Assigning agents using rules directly in task - is it possible?

249 Views

I have spent a lot of time going through the FAQ's and tutorials, but they all seem to assume that you are designing a full workflow. All I want to do is to create a workflow task and assign it to different persons when an Idoc posting fails. This works fine as long as I assign the users (or organizations) static using "Agent assignment" in the Task maintenance, but if I define a rule (which works fine in simulation) and set it as the default rule and then remove the static assignment of agents, no workflow task is created.

Here are the full details of what I did:

First I copied a standard task (WMTOCO_ERROR) into a new task, enabled the standard triggering event and then went into "Additional data/Agent assignment" and assigned an organization to it. This works fine, everytime an Idoc posting fails, a workflow task is created for the person(s) assigned to the organization.

Then I copied the standard rule "edi_process" into a new rule, replaced the function module with my own and ran the simulation. The simulation works fine, and will return a different agent depending on the data in the Idoc.

Finally I replaced the "Agent (Default rule)" with my newly created rule, and re-created the binding exactly like it was for the standard rule (I use exactly the same container, so no need for a new).

Now I assume that I have to delete the static Agent assigment, because otherwise the rule will never be used, correct? But if I do this, no workflow task is created, not even for the person setup as the EDI/Idoc administrator. So what can I do to enable my custom rule?

All helpful answers will be rewarded.