This content has been marked as final.
Show 2 replies
-
1. Re: Composite execution problem
tom.baeyens Apr 16, 2009 3:48 AM (in response to beeke)structure of the process matches the image. its a matter of building your own ActivityBehaviours that implement what you want.
it's probably be easier to leverage jpdl instead. -
2. Re: Composite execution problem
beeke Apr 16, 2009 5:47 AM (in response to beeke)Thank you, Tom
The Sequence class is :test-pojo/EventPropagationTest#Sequence.public static class Sequence implements ExternalActivityBehaviour { private static final long serialVersionUID = 1L; public void execute(ActivityExecution execution) { List<Activity> activities = execution.getActivity().getActivities(); if ( (activities!=null) && (!activities.isEmpty()) ) { execution.execute(activities.get(0)); } } public void signal(ActivityExecution execution, String signal, Map<String, Object> parameters) { Activity previous = execution.getPreviousActivity(); List<Activity> activities = execution.getActivity().getActivities(); int index = activities.indexOf(previous); index++; if (index < activities.size()) { Activity next = activities.get(index); execution.execute(next); } }
When I set the transition:.initial().needsPrevious().transition("end"),
the sequence activity in ExecutionImpl.proceed() will never executed as a block stucted code.
If I modify the structure like this:.startActivity("three", new WaitState()).transition("end") .endActivity()
It works fine.
But the structure is
http://docs.jboss.org/jbpm/pvm/manual/html_single/images/ch02.transition.out.of.composite.png
Can you tell me how to write a currect ActivityBehaviour?
Thank you!