[jboss-user] [jBPM Development] - JBPM-2537

Michael Wohlfart do-not-reply at jboss.com
Wed May 5 04:18:00 EDT 2010

Michael Wohlfart [http://community.jboss.org/people/mwohlf] replied to the discussion


To view the discussion, visit: http://community.jboss.org/message/541258#541258

Hi Guys,

I also stumbled across the jbpm.task.lifecycle.xml file and tried to find out what it was doing, this is what i managed to figure out so far:
The content of the file is read in org.jbpm.pvm.internal.task.LifeCycle.java, it is parsed and seems to implement a kind of min-process / state machine for the task status. You can call LifeCycle.fireLifeCycleEvent(String eventName, TaskImpl task)and it changes the state of the task according to the transitions defined in jbpm.task.lifecycle.xml.

protected static void fireLifeCycleEvent(String eventName, TaskImpl task) {
    // reading the state machine
    ExecutionImpl lifeCycleExecution = new ExecutionImpl();
    ProcessDefinitionImpl lifeCycleProcess = getLifeCycle(task);
    // setting up the current state:
    String state = task.getState();
    Activity activity = lifeCycleProcess.getActivity(state);
    lifeCycleExecution.setActivity((ActivityImpl) activity);
    // performing a transition
    // transfering the new state to the task 

I think this is great stuff, unfortunatly I couldn't find any place in the code where LifeCycle.fireLifeCycleEvent(String eventName,  TaskImpl task)is called, but to me it seems a nice idea to have the task status and transitions configurable in a single file like this.


Reply to this message by going to Community

Start a new discussion in jBPM Development at Community

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20100505/91124dbd/attachment.html 

More information about the jboss-user mailing list