Re: [jboss-user] [jBPM] - Handling process state
by David Jeeves
David Jeeves [http://community.jboss.org/people/jeevdav] replied to the discussion
"Handling process state"
To view the discussion, visit: http://community.jboss.org/message/545385#545385
--------------------------------------------------------------
*package
com.test;
*import
junit.framework.TestCase;
*import
org.jbpm.api.Configuration;*import
org.jbpm.api.Execution;*import
org.jbpm.api.ExecutionService;*import
org.jbpm.api.HistoryService;*import
org.jbpm.api.IdentityService;*import
org.jbpm.api.ManagementService;*import
org.jbpm.api.ProcessEngine;*import
org.jbpm.api.ProcessInstance;*import
org.jbpm.api.RepositoryService;*import
org.jbpm.api.TaskService;
*public
*class TestJBPM *extends TestCase{
*protected *static ProcessEngine +processEngine = *null;
*protected *static RepositoryService +repositoryService;
*protected *static ExecutionService +executionService;
*protected *static ManagementService +managementService;
*protected *static TaskService +taskService;
*protected *static HistoryService +historyService;
*protected *static IdentityService +identityService;
@Override
*protected *void setUp() *throws Exception {
*super.setUp();
*if (+processEngine==*null) {
+processEngine = Configuration.+getProcessEngine+();
+repositoryService = +processEngine.get(RepositoryService.*class);
+executionService = +processEngine.getExecutionService();
+historyService = +processEngine.getHistoryService();
+managementService = +processEngine.getManagementService();
+taskService = +processEngine.getTaskService();
+identityService = +processEngine.getIdentityService();}
}
*public *void testFindOne() {
+repositoryService.createDeployment().addResourceFromClasspath(
"com/test/Proc.jpdl.xml").deploy();
ProcessInstance processInstance =
+executionService.startProcessInstanceByKey("Proc","t");System.
+out.println("process id "+processInstance.getId());
Execution executionInA = processInstance.findActiveExecutionIn(
"a");+assertNotNull+(executionInA);
//processInstance = executionService.signalExecutionById(executionInA.getId());processInstance =
+executionService.findProcessInstanceById("Proc.t");+assertNotNull+(processInstance);
}
*public *void testFindTwo() {
ProcessInstance processInstance =
+executionService.findProcessInstanceById("Proc.t");+assertNotNull+(processInstance);
}
*public *void testFindThree() {
+repositoryService.createDeployment().addResourceFromClasspath(
"com/test/Proc.jpdl.xml").deploy();
ProcessInstance processInstance =
+executionService.findProcessInstanceById("Proc.t");+assertNotNull+(processInstance);
}
}
+
+
**
+
**
+
+
+
+
**
++
++
++
++
++
*++
+
*+*
*
***
+**
+**
+**
+**
+**
+**
*+**
**
*
*
*
*
*
*
*
*
*
*
*
*
*
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/545385#545385]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 4 months
jndi environment
by João Galaio da Silva
Hi everybody,
does anyone knows how to set jndi context properties so i can acess them by
lookup java:comp/env/
without the need to specify this inside a war or ear.
For example, i have this configuration in tomcat 6:
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<Context antiResourceLocking="false" privileged="true">
<Environment description="" name="cas/serverName" override="false"
type="java.lang.String" value="http://localhost:8080"/>
<Environment description=""
name="cas/AuthenticationFilter/casServerLoginUrl" override="false"
type="java.lang.String" value="https://www.ja-sig.org/cas/login"/>
<Environment description=""
name="cas/Cas20ProxyReceivingTicketValidationFilter/casServerUrlPrefix"
override="false"
type="java.lang.String" value="https://www.ja-sig.org/cas"/>
</Context>
How can this be done in jboss-tomcat?
Thanks,
João
14 years, 4 months
[jBPM] - jBPM timer not executing/firing
by jDev Dev
jDev Dev [http://community.jboss.org/people/dSalam] created the discussion
"jBPM timer not executing/firing"
To view the discussion, visit: http://community.jboss.org/message/545355#545355
--------------------------------------------------------------
I am using Eclipse v3 with jbpm 3.2.3
I have a timer in my process definition that should send an email once it fires.
It seems the timer never fires and I am not sure why.
- I included all services in jbpm-context
- my timers are being stored in the databse ( Ican see the tables populating)
- am I missing a class that schedules the timers to run (I thought that the scheduler service takes care of that)???
If I remove the timer from the state and keep the mail statement (to send mail), it WORKS ... so it seems my timer is not firing
** I have tried using event (with <create-timer>), state (with <timer>), a simple system.out but to no avail
Any insight would be appreciated
HERE's all the files I am using for this simple java application
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/545355#545355]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 4 months
[jBPM] - jBPM timer not executing
by Dima Khanafer
Dima Khanafer [http://community.jboss.org/people/juniorDev] created the discussion
"jBPM timer not executing"
To view the discussion, visit: http://community.jboss.org/message/545352#545352
--------------------------------------------------------------
I am using Eclipse v3 with jbpm 3.2.3
I have a timer in my process definition that should send an email once it fires.
It seems the timer never fires and I am not sure why.
- I included all services in jbpm-context
- my timers are being stored in the databse ( Ican see the tables populating)
- am I missing a class that schedules the timers to run (I thought that the scheduler service takes care of that)
If I remove the timer from the state and keep the mail statement (to send mail), it WORKS ... so it seems my timer is not firing
** I have tried using event (with <create-timer>), state (with <timer>)
Any insight would be appreciated
HERE's all the files I am using for this simple java application
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/545352#545352]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 4 months