cancel
Showing results for 
Search instead for 
Did you mean: 

Populate Workflow Container

Former Member
0 Kudos

In relation to topic 224179.

I would like to ask whats the best way to add / populate the custom field from the Workflow Container?

Cindy Sy

Accepted Solutions (1)

Accepted Solutions (1)

pokrakam
Active Contributor
0 Kudos

Hi Cindy,

I am not 100% sure I understand your question, are you just trying to put values into a WF container?

If so, there are a few methods by which the container is populated/changed:

- Binding from event. Usually this only involves the triggering object & user and any parambeters (event container elements) explicitly defined for that event.

- By attributes and a step type 'container operation'. e.g. creating a virtual attribute 'Value' and assigning &INVOICE.VALUE& to the WF element &DOCVALUE&

- By binding from methods/WF steps back to your WF. e.g. &LASTUSER& <- &_WORKITEM.EXECUTEDBYUSER& or whatever. Good practice is to stick to attributes if you are not actuially performing any action, since creating a WF step is significantly more overhead than a container operation.

Hope that helps.

Cheers,

Mike

Former Member
0 Kudos

Hi Mike,

Yes I want to put values into a WFL container.

1.no binding is possible. (no automatic)

2not step container.. since it should be populated before the wfl is even started.. to be used for start condition.

3. pls explain..

myt idea is to change/place value from the change doc badi.

Thanks

Cindy Sy

pokrakam
Active Contributor
0 Kudos

Hi Cindy,

By 3. I meant during the execution of workflow steps you can bring values back into WF to update your container with new values.

You cannot populate a WF container before the flow is started. At start cond time no WF has been created yet.

What are you doing in the badi? Can you not code the same logic into attributes instead? Attributes are also more flexible since they remain dynamic: If the document is changed a BO's attributes also change.

Cheers,

Mike

Former Member
0 Kudos

Hi Cindy,

Why dont you go for Custom BOR - method(background task) that populates the values of these container elements?

Make it as first step of the workflow.

Regards,

<i><b>Raja Sekhar</b></i>

pokrakam
Active Contributor
0 Kudos

Why? This is resource-intensive and simply not necessary. Well, as always one or two exceptions exist, but generally best practice is to use attributes if no actions take place.

In fact you may not even need container elements if you work with attributes. Anything that exists in the database doesn't have to live in the container and certainly doesn't need a separate step (possibly requiring an additional RFC call). Nothing wrong with things like &PROJECT.WBSELEMENT.OWNER.EMAILADDRESS&.

Aside from that, as I understand it the problem is how to populate a container before the WF starts, so I assume it's the event container.

Cheers,

Mike

former_member186746
Active Contributor
0 Kudos

I totally agree with Raja,

Just create your own method to retrieve the custom data.

Or use virtual attributes (these are faster as they don't use an rfc to the method)

Kind regards, Rob Dielemans

Answers (0)