[JBoss jBPM] - Don't see running process in JBPM
by DeanDeen
Hi,
I am working on test project with JBoss jBPM, SEAM on JBoss 4.2.3 Server using ORACLE DB.
Everything is working just fine, except this...
I deploy my application (which include jBPM preces definition) on server and run it via Firefox. My application works just fine as well as process in it.
BUT
When I go to check it in jbpm-console, I don't see nothing until I restart server. After restart I can see process.
What I am searching for is how to see (in jbpm-console) what is happening in my application (with my process) in real-time.
Assume that I am running my application and at some point in process execution I open jbpm-console. I would like so see process image and where exactly my process is at.
Thanks for any suggestion...
Dejan
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4221931#4221931
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4221931
15 years, 8 months
[JBoss jBPM] - custom events / executionContext
by gchanteb
Hi all,
I'm trying to implement custom events. It works, but i have some questions:
I made a test with this process definition:
<process-definition xmlns="urn:jbpm.org:jpdl-3.2" name="process8">
|
| <start-state name="start-state">
| <transition to="state1" name="to state1"/>
| </start-state>
|
| <state name="state1">
| <event type="node-enter">
| <action class="package.Action1"/>
| <script>
| System.out.println("node-enter!");
| </script>
| </event>
| <event type="custom-event">
| <action class="package.Action2"/>
| </event>
| <transition to="end-state" name="to end-state"/>
| </state>
|
| <end-state name="end-state"/>
|
| </process-definition>
With Action1:
public void execute(ExecutionContext executionContext) throws Exception
| {
| executionContext.getToken().getNode().fireEvent("custom-event", executionContext);
| }
And Action2:
public void execute(ExecutionContext executionContext) throws Exception
| {
| System.out.println("custom-event!");
| }
I start and signal the process with jbpm-console, it's ok.
But, first question:
If i change in my processdefinition.xml
<event type="custom-event">
| <action class="package.Action2"/>
| </event>
to
<event type="custom-event">
| <script>
| System.out.println("custom-event!");
| </script>
| </event>
I have an exception... :
anonymous wrote : Error signalling token: An exception of type "org.jbpm.JbpmException" was thrown. The message is: couldn't get value for file 'classes/java/lang/bsh.class'
Question 1- Why ? My System.out.println("node-enter!"); into node-enter!
My second question is:
Question 2 - I would like to start my custom-event into an EJB. I would like to know how to recover the "executionContext" in my code?
I made this test which doesn't work:
public void launchCustomEvent(String processName, long idProcess)
| {
| System.out.println("Launch custom event for "+processName+" / "+idProcess);
|
| jbpmContext = JbpmConfiguration.getInstance().createJbpmContext();
| ProcessInstance processInstance = jbpmContext.getProcessInstance(idProcess);
| ExecutionContext executionContext = new ExecutionContext(processInstance.getRootToken());
| processInstance.getRootToken().getNode().fireEvent("custom-event", executionContext);
| }
Thx.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4221866#4221866
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4221866
15 years, 8 months
[JBoss jBPM] - Re: Fetching Task Variable Instances (Early Loading)
by bradsdavis
Yeah, my suggestion here is the following.
First, I dont think this is as efficient as it should be. However, this is my suggestion at the most efficient result.
Create a DTO that includes the values you want in the grid. Then do a HQL query to fetch the task instance. The key is to make the variable local to the task instance so that it can be pulled in a eager fashion.
So, when you create your task, just add a controller that copies the value from the process instance to the task. That is equivalent to creating a variable locally on the task instance.
So, then you need to fetch the variable eagerly.
| "select task from org.jbpm.taskmgmt.exe.TaskInstance task fetch all properties left join fetch task.variableInstances varInstance"
|
When you are populating your DTO from your TaskInstance objects gathered in the HQL query, make sure you say "getVariableLocally("variableName") rather than the getVariable method. That is crucial.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4221795#4221795
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4221795
15 years, 8 months
[JBoss jBPM] - Re: jPDL: global event handlers
by bradsdavis
I am not sure of an official global event handler. I dont believe there is a way to do that, but here is one possible solution otherwise.
One option would be to write a log handler that executes on the different logs to send events. Most of the event types are logged, so you could get at the same data.
| <!-- A : org.jbpm.graph.log.ActionLog -->
| <!-- B : org.jbpm.context.log.ByteArrayUpdateLog -->
| <!-- C : org.jbpm.logging.log.CompositeLog -->
| <!-- D : org.jbpm.context.log.VariableDeleteLog -->
| <!-- E : org.jbpm.context.log.DateUpdateLog -->
| <!-- F : org.jbpm.context.log.HibernateStringUpdateLog -->
| <!-- G : org.jbpm.context.log.LongUpdateLog -->
| <!-- H : org.jbpm.context.log.HibernateLongUpdateLog -->
| <!-- I : org.jbpm.graph.log.ProcessInstanceCreateLog -->
| <!-- L : org.jbpm.context.log.DoubleUpdateLog -->
| <!-- M : org.jbpm.logging.log.MessageLog -->
| <!-- N : org.jbpm.graph.log.NodeLog -->
| <!-- O : org.jbpm.graph.log.TokenCreateLog -->
| <!-- P : org.jbpm.logging.log.ProcessLog -->
| <!-- R : org.jbpm.context.log.VariableCreateLog -->
| <!-- S : org.jbpm.graph.log.SignalLog -->
| <!-- T : org.jbpm.graph.log.TransitionLog -->
| <!-- U : org.jbpm.context.log.StringUpdateLog -->
| <!-- V : org.jbpm.context.log.VariableLog -->
| <!-- W : org.jbpm.context.log.VariableUpdateLog -->
| <!-- X : org.jbpm.graph.log.ProcessInstanceEndLog -->
| <!-- Y : org.jbpm.graph.log.TokenEndLog -->
| <!-- Z : org.jbpm.graph.log.ProcessStateLog -->
| <!-- 0 : org.jbpm.taskmgmt.log.TaskLog -->
| <!-- 1 : org.jbpm.taskmgmt.log.TaskCreateLog -->
| <!-- 2 : org.jbpm.taskmgmt.log.TaskAssignLog -->
| <!-- 3 : org.jbpm.taskmgmt.log.TaskEndLog -->
| <!-- 4 : org.jbpm.taskmgmt.log.SwimlaneLog -->
| <!-- 5 : org.jbpm.taskmgmt.log.SwimlaneCreateLog -->
| <!-- 6 : org.jbpm.taskmgmt.log.SwimlaneAssignLog -->
|
In the jbpm configuration, then just configure in your logger.
|
| <service name="logging">
| <factory>
| <bean class="you.logger.Class"></bean>
| </factory>
| </service>
|
|
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4221794#4221794
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4221794
15 years, 8 months