[jboss-user] [JBoss jBPM] - Re: jBPM 4 ProcessFactory/ProcessBuilder not found
sterjev.marjan
do-not-reply at jboss.com
Tue Jun 30 03:17:31 EDT 2009
package impl;
import org.jbpm.api.activity.ActivityBehaviour;
import org.jbpm.api.activity.ActivityExecution;
import org.jbpm.jpdl.internal.activity.StartActivity;
import org.jbpm.pvm.internal.builder.ProcessDefinitionBuilder;
import org.jbpm.pvm.internal.model.ProcessDefinitionImpl;
/**
* @author Marjan Sterjev
*
*/
public class Display implements ActivityBehaviour {
private static final long serialVersionUID = 1L;
String message;
public Display(String message) {
this.message = message;
}
public void execute(ActivityExecution execution) {
System.out.println(message);
}
public static void main(String[] args) throws Throwable {
ProcessDefinitionBuilder builder = ProcessDefinitionBuilder
.startProcess("Hello World");
builder.startActivity(new StartActivity()).initial().transition(
"hello display").endActivity();
builder.startActivity("hello display", new Display("Hello"))
.transition("world display").endActivity();
builder.startActivity("world display", new Display("World"))
.endActivity();
ProcessDefinitionImpl processDefinition = builder.endProcess();
processDefinition.startProcessInstance();
}
}
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4240933#4240933
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4240933
More information about the jboss-user
mailing list