I'm new in jBPM5.0 and I'm looking for a way to access the current state or something like that in ftl files with the expression language or at least in a script to pass it to a variable. In my use case it is needed to know about the user who is currently logged on and the one who has created the task (both users use the jbpm console)
In addition to it (but it's not sooo important at this moment) I'd like to get information about the current process like its name and the instance.
It seems to be as a matter of course or to obviously, but I wasn't able to find a way to do this.
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:
As you can see, you can get all the information about the process instances, node instances including all the variables.