[JBoss jBPM] - Re: Trying to persist process instances - need some help
by terigox
Thanks again for the help kukeltje,
If I remove the jbpm.cfg.xml I'm not exactly sure how to get a hold of my jbpmContext, I tried:
| JbpmConfiguration jbpmConfiguration = JbpmConfiguration.getInstance();
| JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
|
But that leaves me with this exception
| java.lang.ClassCastException: org.jbpm.persistence.jta.JtaDbPersistenceServiceFactory cannot be cast to org.jbpm.svc.ServiceFactory
| org.jbpm.svc.Services.getServiceFactory(Services.java:117)
| org.jbpm.svc.Services.getService(Services.java:134)
|
I tried putting my jbpm.cfg.xml back and added a bit more content, following the included guide for jBPM and made my jbpm.cfg.xml look as follows:
| <jbpm-configuration>
|
| <jbpm-context>
| <service name='persistence' factory='org.jbpm.persistence.db.DbPersistenceServiceFactory' />
| </jbpm-context>
|
| <string name='resource.hibernate.cfg.xml' value='hibernate.cfg.xml' />
| <string name='resource.business.calendar' value='org/jbpm/calendar/jbpm.business.calendar.properties' />
| <string name='resource.default.modules' value='org/jbpm/graph/def/jbpm.default.modules.properties' />
| <string name='resource.converter' value='org/jbpm/db/hibernate/jbpm.converter.properties' />
| <string name='resource.action.types' value='org/jbpm/graph/action/action.types.xml' />
| <string name='resource.node.types' value='org/jbpm/graph/node/node.types.xml' />
| <string name='resource.varmapping' value='org/jbpm/context/exe/jbpm.varmapping.xml' />
| </jbpm-configuration>
|
I get the same error:
| java.lang.IllegalArgumentException: Can not set long field org.jbpm.graph.def.GraphElement.id to org.jbpm.graph.node.MailNode
| sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:146)
| sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.jav
|
I'm confused as to why it's trying to create a "MailNode" anyway. None of my nodes in my process definition are MailNodes. Does having a task-node force it to also create a MailNode? I could try an even simpler example with only a single StateNode to see if it works at all with explicitly saving.
Any thoughts? I really appreciate the help!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4199600#4199600
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4199600
17 years, 3 months
[JBoss jBPM] - Cancelling action execution
by jjrs
Hi,
We have a JobExecutor running actions in parallel using async='true'. In this scenario, we need to be able to stop the execution of actions (from the command line or the console, it doesn't matter at this stage). If possible I would like to avoid killing the associated java process for being able to report to the database that the action has been stopped by user interaction.
I have been trying to accomplish this requirement using the jBPM console, although all I have been able to achieve is stop the node (so I get a SOE once the action is finished and the and the node information is modified in the database). I have been looking for a way to be able to stop the actions, but I don't see how to do this in an easy way, after having a look to the CancelXXXCommand classes.
Could anyone provide any idea or suggestion?
Thanks a lot in advance.
Jose.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4199584#4199584
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4199584
17 years, 3 months
[JBoss jBPM] - Process State in a Fork not executing correctly
by philso
Hi, I have a test running that contains multiple nodes including two Process States. JPEG of the Process Definition is at:
http://picasaweb.google.com/lh/sredir?uname=phil.omalley&target=ALBUM&id=...
Process State 1 (LoadSubProcess1) is on the main path of execution. Process State 2 (LoadSubProcess2) is in a fork with two paths. I find I can execute my test fine up to the Process State in the Fork (LoadSubProcess2). My test can traverse fine through the first process State (LoadSubProcess1). When execution gets to the Fork alls well, child tokens are created OK but when execution is called on the transition into LoadSubProcess2 the Sub Process is not entered and the only available transition to this token is "fromLoadSubProcess2" (the transition after LoadSubProcess2). So it looks like the child tokens execution path cannot execute the Sub Process. For this test I've made LoadSubProcess1 & 2 point to the same ProcessDefinition xml so I know the xml is OK. The two other child paths execute fine and complete ok into the join node. The only difference I can see is one Process State call is made from the main execution path and the failing one is made from a child execution path. Does anyone have an idea what I'm doing wrong here? Many thanks for your time & effort.
The Main Process Definition xml
| <?xml version="1.0" encoding="UTF-8"?>
| <process-definition xmlns="urn:jbpm.org:jpdl-3.2urn:jbpm.org:jpdl-3.2"
| name="SampleProcess">
| <start-state name="Start">
| <transition to="task-node1" name="to task-node1">
| </transition>
| </start-state>
| <task-node name="task-node1" signal="never">
| <task name="taskNametask-node1" />
| <transition to="state0" name="to-state0"></transition>
| </task-node>
| <state name="state0">
| <transition to="LoadSubProcess1" name="toLoadSubProcess1"></transition>
| </state>
| <fork name="fork1">
| <transition to="state1" name="toState1"></transition>
| <transition to="state2" name="to state2"></transition>
| <transition to="state3" name="to state3"></transition>
| </fork>
| <state name="state1">
| <event type="node-leave">
| <action
| class="com.meridianp2p.stf.impl.workflow.ProcessChangeEventNotifier"></action>
| </event>
| <transition to="task-node2" name="to task-node2"></transition>
| </state>
| <state name="state2">
| <event type="node-leave">
| <action
| class="com.meridianp2p.stf.impl.workflow.ProcessChangeEventNotifier"></action>
| </event>
| <transition to="task-node3" name="to task-node3"></transition>
| </state>
| <task-node name="task-node2" signal="never">
| <task name="taskNametask-node2" />
| <transition to="LoadSubProcess2" name="toLoadSubProcess2"></transition>
| </task-node>
| <task-node name="task-node3" signal="never">
| <task name="taskNametask-node3" />
| <transition to="join1" name="from task-node3"></transition>
| </task-node>
| <state name="state3">
| <event type="node-leave">
| <action
| class="com.meridianp2p.stf.impl.workflow.ProcessChangeEventNotifier"></action>
| </event>
| <transition to="task-node4" name="to task-node4"></transition>
| </state>
| <task-node name="task-node4" signal="never">
| <task name="taskNametask-node4" />
| <transition to="state4" name="to state4"></transition>
| </task-node>
| <join name="join1">
| <transition to="taskNode6" name="toTaskNode6"></transition>
| </join>
| <task-node name="task-node5" signal="never">
| <task name="taskNametask-node5" />
| <transition to="join1" name="from task-node5"></transition>
| </task-node>
| <state name="state4">
| <event type="node-enter">
| <action
| class="com.meridianp2p.stf.impl.workflow.ProcessChangeEventNotifier"></action>
| </event>
| <transition to="task-node5" name="to task-node5"></transition>
| </state>
| <process-state name="LoadSubProcess2">
| <sub-process name="LoadSubProcess" />
| <transition to="join1" name="fromLoadSubProcess2"></transition>
| </process-state>
| <task-node name="taskNode6" signal="never">
| <task name="taskNametask-node6" />
| <transition to="End" name="toEnd"></transition>
| </task-node>
| <process-state name="LoadSubProcess1">
| <sub-process name="LoadSubProcess" />
| <transition to="task-nodeA" name="to task-nodeA"></transition>
| </process-state>
|
| <state name="stateA">
| <transition to="fork1" name="toFork1"></transition>
| </state>
|
| <task-node name="task-nodeA" signal="never">
| <task name="taskNametask-nodeA" />
| <transition to="stateA" name="toStateA"></transition>
| </task-node>
| <end-state name="End"></end-state>
| </process-definition>
|
Sub Process XML
| <?xml version="1.0" encoding="UTF-8"?>
|
| <process-definition xmlns="" name="LoadSubProcess">
|
|
| <start-state name="Start">
| <event type="node-enter" >
| <action class="com.meridianp2p.stf.impl.workflow.ProcessChangeEventNotifier"></action>
| </event>
| <transition to="LoadIncomplete" name="toLoadIncomplete"></transition>
| </start-state>
|
|
| <state name="LoadIncomplete">
| <event type="node-enter" >
| <action class="com.meridianp2p.stf.impl.workflow.ProcessChangeEventNotifier"></action>
| </event>
| <transition to="CreateOrUpdateDoc" name="toCreateOrUpdateDoc"></transition>
| <transition to="CancelTrip" name="toCancelTrip"></transition>
| <transition to="CreateDoc" name="toCreateDoc"></transition>
| <transition to="TripCompleted" name="toTripCompleted"></transition>
| </state>
|
| <task-node name="CreateDoc" signal="never">
| <event type="node-enter" >
| <action class="com.meridianp2p.stf.impl.workflow.WorkflowTaskExecuterImpl"></action>
| </event>
| <task name ="taskCreateDoc" />
| <transition to="LoadIncomplete" name="fromCreateDocToLoadIncomplete"></transition>
| </task-node>
|
| <task-node name="CreateOrUpdateDoc" signal="never">
| <event type="node-enter" >
| <action class="com.meridianp2p.stf.impl.workflow.WorkflowTaskExecuterImpl"></action>
| </event>
| <task name ="taskCreateOrUpdateDoc" />
| <transition to="LoadIncomplete" name="fromCreateOrUpdateDocToLoadIncomplete"></transition>
| </task-node>
|
| <task-node name="CancelTrip" signal="never">
| <event type="node-enter" >
| <action class="com.meridianp2p.stf.impl.workflow.WorkflowTaskExecuterImpl"></action>
| </event>
| <task name ="taskCancelTrip" />
| <transition to="TripConcelled" name="toTripCancelled"></transition>
| </task-node>
|
| <task-node name="TripCompleted" signal="never">
| <event type="node-enter" >
| <action class="com.meridianp2p.stf.impl.workflow.WorkflowTaskExecuterImpl"></action>
| </event>
| <task name ="taskTripCompleted" />
| <transition to="LoadCompleted" name="toLoadCompleted"></transition>
| </task-node>
|
| <state name="LoadCompleted">
| <description>
| Had to add this state node here because the running tests we see the end state is never rested on when this process is used
| as a subprocess
| </description>
| <transition to="LoadEnd" name="toLoadEnd"></transition>
| </state>
|
| <state name="TripConcelled">
| <transition to="TripCancelEnd" name="toTripCancelEnd"></transition>
| </state>
|
|
| <end-state name="TripCancelEnd">
| <event type="node-enter" >
| <action class="com.meridianp2p.stf.impl.workflow.ProcessChangeEventNotifier"></action>
| </event>
| </end-state>
|
| <end-state name="LoadEnd" >
| <event type="node-enter" >
| <action class="com.meridianp2p.stf.impl.workflow.ProcessChangeEventNotifier"></action>
| </event>
| </end-state>
|
| </process-definition>
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4199561#4199561
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4199561
17 years, 3 months
[JBoss jBPM] - process variable persistance
by aspider
I define several process variable in process
I found that if variable type is String value, the persistance in table jbpm_variableinstance is OK , I can read their value from the way as below codes.
if variable type is other types, such as Boolean/List, the result is always null.
Boolean type is in table jbpm_variableinstance is S type, same as String type variable, having T/F value.
While List type is B type in table, having null value.
Whats the problem? And how to save this kind of process varible.
Thanks a lot.
| ProcessInstance pi = jbpmContext.getProcessInstance(new Long("xxxx"));
| String originator = (String)pi.getContextInstance().getVariable("originator");
| BooleanisDelegated = (Boolean)pi.getContextInstance().getVariable("isDelegated");
| List delegators = (List)pi.getContextInstance().getVariable("delegators");
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4199440#4199440
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4199440
17 years, 3 months
[JBoss jBPM] - Re: DatabaseServerLoginModule question
by jeremiah.lumontod
thanks ronald. here's what i did in my web.xml:
<security-constraint>
<web-resource-collection>
<web-resource-name>Secure Area</web-resource-name>
<url-pattern>/sa/*</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint>
<role-name>admin</role-name>
<role-name>user</role-name>
<role-name>manager</role-name>
<role-name>hr</role-name>
<role-name>sales</role-name>
<role-name>support</role-name>
<role-name>it</role-name>
<role-name>Talent scout</role-name>
<role-name>Legal adviser</role-name>
<role-name>Band member</role-name>
<role-name>Record producer</role-name>
<role-name>Artist development</role-name>
<role-name>Songwriter</role-name>
<role-name>Musician</role-name>
<role-name>Video production</role-name>
<role-name>Artist</role-name>
<role-name>Administrator</role-name>
<role-name>participant</role-name>
</auth-constraint>
</security-constraint>
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4199400#4199400
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4199400
17 years, 3 months