niyue

jBpm中的泳道

In java, programming on April 3, 2005 at 1:09 PM

在jBpm的邮件列表上的一些关于jBpm泳道的信息:
2 posible transitions for 2 different roles

Hello,
i’m reading the docs but i can’t see if, being in 1 state and having 2 possible actions (transitions to make), it’s possible to be performed by 2 different roles.
For example :
<state name=”evaluating”>
<transition name=”approve” to=”fork”/>
<transition name=”disapprove” to=”done”/>
</state>
The approve transition can be made by role 1 (swimlane) and the disapprove transition can be made only by another role(swimlane).

Can i do that?… Or how can i represent that scenario..

Thanks a lot.

You are right, it can’t. A state is acted on by one role. (think in states, not in activities!!!!)

You can ofcourse write your own gui and have additional roles there and only allow one actor to submit one transition and vise versa, but that is not what you (and I) want.

Can you explain a little What do you want to achieve? The first to act wins? IF I know a little more detail, I can maybe give you a good answer.

Ronald

jbpm does not do authentication. this should be done by the environment. (e.g. the webapplication environment or the ejb environment).

in one of the previous versions, we had the most generic organisation module possible. turned out not te be generic enough. so we eliminated any dependency from within the jbpm code. Your organisation model should only be used from within your AssignmentHandler implementations. jBPM only stores references to actors as text so they can represent people, groups or systems in your context.

regards, tom.

from one state to two different swimlane ?

Hi,
I have a use case:
– a user can submit a request
– a user can cancel a request
– a manager can approve/reject a request

So I think I need to define two swimlanes, one for requester, and one for manager. However, I donot know how to transition from ‘evaluating’ state to two states which are for different swimlanes:
<!– START-STATE –>
<start-state name=”request”
swimlane=”requester”>
<transition to=”evaluating”/>
</start-state>

<!– NODES –>
<state name=”evaluating”>
<assignment swimlane=”owner” />
<transition name=”approve” to=”done”/>
<transition name=”reject” to=”done”/>
</state>

How do I define the ‘cancel’ state for the requester ? thanks
li xin

How to assign swimlanes properly?

Thanks for your replies…

I used the following state definition:

<state name=”life”>
<assignment swimlane=”human” authentication=”verify” />
<transition to=”death” />
</state>

The test code:

try {
executionService.endOfState(token.getId());
fail(“Task is closed by unauthorized user.”);
} catch (ExecutionException e) {
e.printStackTrace();
}

Now the code passed the test.

As much as I understand from the documentation and your replies, authentication is not part of the primary responsibilities of Jbpm. But we should use getTaskList method in order to assign the tasks to the correct user.

openExecutionService(actorId) method mislead me. I thought that executionService is bound to the actorId. Thus it is responsible of authentication of the endOfState method. However the actorId parameter is passed to the executionService for logging purposes. Thus it is optional.

Thank you very much for your help…

Best regards,

Mert Nuhoglu

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: