Question

I'm new to jBPM 5.4 and and also to the BPM work-flow genre.

I have a simple requirement to submit a product and a concerned supervisor needs to accept or reject it.

Based on the decision made, flows in a different path.

                        No
                       ------------ State A
Approval -------------|
                       ------------ State B
                         Yes

This is the simple work-flow needed to be implemented.

My question is the "Approval" must be performed by a user.

How to simulate such a human task in jBPM 5.0 with eclipse tooling.

Also how to upload this proj to jBPM console and programatically invoke the flow.

Thanks in advance.

Était-ce utile?

La solution

You should use a user task to model the approval request, and use a result mapping to map the answer to a process variable. You can then use this variable in for example an exclusive gateway to make a decision based on the response of the user.

There is an example in the jbpm-examples module that does something similar: use a human task to ask for approval: https://github.com/droolsjbpm/jbpm/blob/master/jbpm-examples/src/main/resources/humantask/HumanTask.bpmn

Kris

Autres conseils

In web Designer, the conditions are not set in the gateway but in each of its outgoing flows. What you need to do it to click on one of the outgoing flows, and in its "Conditional Expression" attribute write:

return approval == true;

Make sure that "Contitional Expression Language" is set to 'java'

Repeat the steps for the second flow.

Ref: https://community.jboss.org/thread/204303

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top