JBoss Community

Re: Accessing the current state in Script or User Tasks

created by hamsterdancer in jBPM - View the full discussion

Ok, I found a solution for the "optional" point. I'm now able to get additional information about the current process like the name, instance and the node itself with all its variables. But I need still the current user of the jBPM console. Any idea?

 

To whom it may concern:

With the kcontext variable which you can also access in scripts, you are an object of the class using org.drools.spi.ProcessContext which implements the following interface:

 

http://docs.jboss.org/jbpm/v5.1/javadocs/org/drools/runtime/process/ProcessContext.html

 

As you can see, you can get all the information about the process instances, node instances including all the variables.

Reply to this message by going to Community

Start a new discussion in jBPM at Community