Skip to Content

Workflow Agent Rule not binding to Container


I've created a Workflow task that uses a bespoke rule to determine the Agents. This is working correctly- the task is being assigned to the agents as expected.

What I want to do is to retain this list of possible Agents for use in a later step (i.e. deadline monitoring to send reminder emails). In the binding for the rule, I've assigned &_RULE_RESULT& to a main container element, which is a BOR object of type AAGENT. The Import and Export parameters of this container element are ticked.

At runtime, displaying this main container element shows that it has not been instantiated. The container element _RULE_RESULT of the workflow step contains the correct entries.

I've found mention in the SAP help that the result of a rule can be bound to a container element, so what am I missing?


Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • May 24, 2017 at 09:42 PM

    This is new to me, I would have expected it to work.

    Quick workaround if you don't want to spend much time on it: Evaluate your rule in a separate step and fill an agent table container element. Then use that table as your agents in your step, it will also remain in the WF container.

    Add comment
    10|10000 characters needed characters exceeded

    • D'Oh! I must read question properly, somehow I read in your question that the SAP help says it can't be done.

      Anyway, workaround is still valid. Assigning it to a BOR object won't work, because it will have an instance in memory but with Objects only the key is stored in the container. Since there is no data saved to the DB, the BOR object has no key, and thus can't re-instantiate itself when you look at the log after execution.

      I don't have a system in front of me, but check the data type of _RULE_RESULT - is it really the BOR object? If so, can you retrieve the agents as an attribute of the BOR object and bind those to a container element (multiline)?

      So binding would be something like &_RULE_RESULT.AGENTS& ==> &RULE_AGENTS&

  • May 29, 2017 at 05:19 AM

    Can you trying binding &_RULE_RESULT.AGENTS& to a variable of type SWP_AGENT?

    Add comment
    10|10000 characters needed characters exceeded

    • Apologies for the delayed response!

      I've just tried defining the container element as multiline SWP_AGENT, but it still doesn't work. I didn't think this would be correct anyway because although it's the correct length (14 characters) it doesn't have the required structure of Object Type and Object. The workflow definition did warn about this.

      I've also tried SWFUAGENTS, which is of the correct structure, but this didn't work either.

      Thanks anyway!