"apill" wrote : We have an EJB 3 application running in Jboss that is designed
to track inventory. Our data model is persisted with hibernate and according to the EJB3
spec and we're using stateless session beans to execute business logic from the client
application.
|
| I would like design a workflow to manage which actions can be performed upon an item
of inventory at any point during it's life. For example, if it is in a repair state it
can either be repaired or scrapped.
|
| From the client app it would be nice to ask the server...
| what are the current available actions for this inventory?
| then...
| 1. user selects an action
| 2. client app collects necessary data from the user for the action
| 3. client invokes the action in the workflow to move the inventory to its next state
|
| Is this a valid scenario that could be integrated with jBPM? How might i go about
this? Can someone point me to some documentation that might help?
|
| The tutorial/getting started docs are fine, but they give me no clue as to how to
begin integrating a workflow with my system.
|
| Adrian
Yes, it is a viable scenario to implement with jBPM. If you already read the
tutorial/getting started, then you need to study the API and the manual, all the info is
there.
Regarding the "user selects an action" you have two ways to implement
conditions:
anonymous wrote :
| 9.3.4. Nodetype decision
|
| Actually there are 2 ways to model a decision. The distinction between the two is
based on *who* is making the decision. Should the decision made by the process (read:
specified in the process definition). Or should an external entity provide the result of
the decision.
|
| When the decision is to be taken by the process, a decision node should be used. There
are basically 2 ways to specify the decision criteria. Simplest is by adding condition
elements on the transitions. Conditions are beanshell script expressions that return a
boolean. At runtime the decision node will loop over its leaving transitions (in the order
as specified in the xml), and evaluate each condition. The first transition for which the
conditions resolves to 'true' will be taken. Alternatively, an implementation of
the DecisionHandler can be specified. Then the decision is calculated in a java class and
the selected leaving transition is returned by the decide-method of the DecisionHandler
implementation.
|
| When the decision is taken by an external party (meaning: not part of the process
definition), you should use multiple transitions leaving a state or wait state node. Then
the leaving transition can be provided in the external trigger that resumes execution
after the wait state is finished. E.g. Token.signal(String transitionName) and
TaskInstance.end(String transitionName).
As you may see from this quote, what you're asking is in the docs. Read chapters 3, 4,
6, 7, 9 (at least these regarding integration, however it is strongly recomended that you
read the remaining chapters).
If you still have doubts, then I ask you: if you have a full API (jBPM API), what can YOU
do to integrate it with your application if you already know Java????
Regards.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3985508#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...