Re: [jboss-user] [jBPM] - Get subprocess id from outside the process
by Michael Wohlfart
Michael Wohlfart [http://community.jboss.org/people/mwohlf] replied to the discussion
"Get subprocess id from outside the process"
To view the discussion, visit: http://community.jboss.org/message/555491#555491
--------------------------------------------------------------
I tried to reproduce this issue so I added a testcase to
org.jbpm.examples.subprocess.outcomeactivity.SubProcessOutcomeActivityTest
but the following testcase passed for me:
public void testSubProcessIdQuery() {
ProcessInstance processInstance = executionService.startProcessInstanceByKey("SubProcessDocument");
final Execution execution = processInstance.findActiveExecutionIn("review");
assertNotNull(execution);
assertNotNull(processEngine);
String pid = ((ExecutionImpl) execution).getSubProcessInstance().getId();
assertNotNull(pid);
List<Task> taskList = taskService.findPersonalTasks("johndoe");
Task task = taskList.get(0);
taskService.completeTask(task.getId(), "reject");
}
so maybe if you post your testcase someone is able to shed some light on this
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/555491#555491]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 5 months
Re: [jboss-user] [jBPM] - How to handle failed processes/states due to server crashes?
by Michael Rinne
Michael Rinne [http://community.jboss.org/people/mrinneL1] replied to the discussion
"How to handle failed processes/states due to server crashes?"
To view the discussion, visit: http://community.jboss.org/message/555485#555485
--------------------------------------------------------------
Hi,
Concerning exception handling, I saw that advice to take care of exceptions in the user code a couple of times in this forum, but I am not totally convinced that this is capable to handle all cases that arise in BPM.
Let us assume I have a process definition containing the sequence state1 -> task1 -> task2 -> state2. Let us further assume there is some sort of dependency between task1 and task2, i.e. if task2 fails we have to perform some kind of undo for task1. If I handle exceptions within the user code for task2 I am not able to undo task1, because I do not want task2 to know about task1. For the same reason, I do not want to combine task1 and task2 into a single task.
The solution in jpdl 4 seems to be adding another transition from task2 to a task "undo_task1" and any exception in task2 will make sure that we take the transition to "undo_task1". Another transition from "undo_task1" will lead back to state1 and of course we add a decision in order to prevent processing from taking this circle endlessly.
However, an exception-handler as provided by jpdl 3 seems to be a convenient way to handle most exceptions on a BPM scale, although it will most likely not be as flexible as the explicit solution sketched above.
What are you opinions on this?
Does anyone have a better idea on how to do exception handling on BPM scale with jpdl 4?
Thanks,
Michael
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/555485#555485]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 5 months
[JCA] - Unable to get EJB3 loaded on 5.0.1
by Its Me
Its Me [http://community.jboss.org/people/heyyou] created the discussion
"Unable to get EJB3 loaded on 5.0.1"
To view the discussion, visit: http://community.jboss.org/message/555480#555480
--------------------------------------------------------------
Hello,
I've been working to get EJB3 application deployed to JBoss 5.0.1 server using DB2 as the database.
This application deployed to 5.0. This is a new 5.0.1 installation
The environment is :
JBoss: JBoss 5.0.1, Sun JDK 1.6.0.19, DB2 jcc drivers
DB2: DB2 9.5 fp 5
server/jdbc: mydb.myco.com:50000/MyData
>From the JBoss system, I've installed the DB2 client and can successfully connect to the
server and database from the JBoss system.
The console messages are
------------------------------------------------------------------------------------------------------------------------------------------
20:02:28,702 INFO [JBossASKernel] Created KernelDeployment for: MyAppEJB3.jar
20:02:28,702 INFO [JBossASKernel] installing bean: jboss.j2ee:ear=MyApp.ear,jar=MyAppEJB3.jar,name=MyDataSessionEJB3,service=EJB3
20:02:28,702 INFO [JBossASKernel] with dependencies:
20:02:28,702 INFO [JBossASKernel] and demands:
20:02:28,702 INFO [JBossASKernel] persistence.unit:unitName=MyApp.ear/MyAppEJB3.jar#MyAppEJB3
20:02:28,717 INFO [JBossASKernel] jboss.ejb:service=EJBTimerService
20:02:28,717 INFO [JBossASKernel] and supplies:
20:02:28,717 INFO [JBossASKernel] jndi:/com/myco/my/app/ejb/MyDataSessionEJB
20:02:28,717 INFO [JBossASKernel] jndi:MyApp/MyDataSessionEJB3/local
20:02:28,717 INFO [JBossASKernel] Class:com.myco.my.app.ejb3.MyDataSessionLocal
20:02:28,717 INFO [JBossASKernel] jndi:MyApp/MyDataSessionEJB3/local-com.myco.my.app.ejb3.MyDataSessionLocal
20:02:28,717 INFO [JBossASKernel] Added bean(jboss.j2ee:ear=MyApp.ear,jar=MyAppEJB3.jar,name=MyDataSessionEJB3,service=EJB3) to KernelDeployment of: MyAppEJB3.jar
20:02:30,546 WARN [JAXWSDeployerHookPreJSE] Cannot load servlet class: com.myco.my.app.web.MyDataServlet
20:02:30,577 WARN [JAXWSDeployerHookPreJSE] Cannot load servlet class: TestCacheServlet
20:02:30,577 WARN [JAXWSDeployerHookPreJSE] Cannot load servlet class: com.myco.my.app.web.Test
20:02:32,655 INFO [TomcatDeployment] deploy, ctxPath=/MyDataWeb
20:02:32,952 INFO [ProfileServiceBootstrap] Loading profile: ProfileKey@22a7c7[domain=default, server=default, name=all]
20:02:32,952 ERROR [ProfileServiceBootstrap] Failed to load profile: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):
DEPLOYMENTS MISSING DEPENDENCIES:
Deployment "jboss.j2ee:ear=MyApp.ear,jar=MyAppEJB3.jar,name=MyDataSessionEJB3,service=EJB3" is missing the following dependencies:
Dependency "<UNKNOWN jboss.j2ee:ear=MyApp.ear,jar=MyAppEJB3.jar,name=MyDataSessionEJB3,service=EJB3>" (should be in state "Described", but is actually in state "** UNRESOLVED Demands 'persistence.unit:unitName=MyApp.ear/MyAppEJB3.jar#MyAppEJB3' **")
Deployment "jboss.j2ee:ear=MyApp.ear,jar=MyAppEJB3.jar,name=MyDataSessionEJB3,service=EJB3_endpoint" is missing the following dependencies:
Dependency "jboss.j2ee:ear=MyApp.ear,jar=MyAppEJB3.jar,name=MyDataSessionEJB3,service=EJB3" (should be in state "Configured", but is actually in state "PreInstall")
Deployment "persistence.unit:unitName=MyApp.ear/MyAppEJB3.jar#MyAppEJB3" is missing the following dependencies:
Dependency "jboss.jca:name=MyDataDataSource,service=DataSourceBinding" (should be in state "Create", but is actually in state "** NOT FOUND Depends on 'jboss.jca:name=MyDataDataSource,service=DataSourceBinding' **")
DEPLOYMENTS IN ERROR:
Deployment "jboss.jca:name=MyDataDataSource,service=DataSourceBinding" is in error due to the following reason(s): ** NOT FOUND Depends on 'jboss.jca:name=MyDataDataSource,service=DataSourceBinding' **
Deployment "<UNKNOWN jboss.j2ee:ear=MyApp.ear,jar=MyAppEJB3.jar,name=MyDataSessionEJB3,service=EJB3>" is in error due to the following reason(s): ** UNRESOLVED Demands 'persistence.unit:unitName=MyApp.ear/MyAppEJB3.jar#MyAppEJB3' **
------------------------------------------------------------------------------------------------------------------------------------------
The JDBC configuration consists of :
1. JDBC drivers installed into 'server/all/lib :
db2jcc.jar
db2jcc_license_cu.jar
2. server/all/deply/db2-ds.xml
<datasources>
<local-tx-datasource>
<jndi-name>jdbc/MyDataDataSource</jndi-name>
<connection-url>jdbc:db2://mydb.myco.com:50000/MyData</connection-url>
<driver-class>com.ibm.db2.jcc.DB2Driver</driver-class>
<user-name>myUser</user-name>
<password>myPassword</password>
<min-pool-size>20</min-pool-size>
<max-pool-size>200</max-pool-size>
<prepared-statement-cache-size>100</prepared-statement-cache-size>
<metadata>
<type-mapping>DB2</type-mapping>
</metadata>
</local-tx-datasource>
</datasources>
3. server/all/conf/standardjbosscmp-jdbc.xml
<jbosscmp-jdbc>
<defaults>
<datasource>java:/jdbc/MyDataDataSource</datasource>
4. MyApp.ear/MyAppEJB3.jar/META-INF/persistence.xml
<persistence>
<persistence-unit name="MyAppEJB3" transaction-type="JTA">
<jta-data-source>java:/MyDataDataSource</jta-data-source>
<class>com.myco.my.data.entities.Acct</class>
<class>com.myco.my.data.entities.Type</class>
<class>com.myco.my.data.entities.CustomerName</class>
<class>com.myco.my.data.entities.CustomerType</class>
<properties>
<property name="hibernate.default_schema" value="MySchema"/>
<property name="hibernate.connection.username" value="myUser"/>
<property name="hibernate.connection.password" value="myPasswd"/>
<property name="hibernate.dialect" value="org.hibernate.dialect.DB2Dialect"/>
<property name="hibernate.show_sql" value="false" />
</properties>
</persistence-unit>
</persistence>
----------------------
I'm sure I'm overlooking something simple here, but just can't see to track it down.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/555480#555480]
Start a new discussion in JCA at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 5 months