[jBPM Users] - [jBPM4] Programatic deployment - DEPLOYPROP table is empty
by DrBrain
Hello,
I'm trying to programmatically deploy a process definition, using:
NewDeployment newDeployment = processEngine.getRepositoryService().createDeployment();
| newDeployment.addResourceFromString(processName, processDefinition).deploy();
The above creates two entires in my db, in JBPM4_DEPLOYMENT and JBPM4_LOB tables (nothing else is created in any other table).
Later on, when I try to start an instance of the above process like:
ExecutionService executionService = processEngine.getExecutionService();
| ProcessInstance pi = executionService.startProcessInstanceById(processID);
passing as 'processID' the value I obtained during deployment, I get:
org.jbpm.api.JbpmException: no process definition with id '15'.
(15 is my processID obtained during deployment).
Checking hibernate's queries, I see that jBPM is trying to execute:
select * from ( select deployment0_.DBID_ as DBID1_81_, deployment0_.DEPLOYMENT_ as DEPLOYMENT2_81_, deployment0_.OBJNAME_ as OBJNAME3_81_, deploym
| ent0_.KEY_ as KEY4_81_, deployment0_.STRINGVAL_ as STRINGVAL5_81_, deployment0_.LONGVAL_ as LONGVAL6_81_ from JBPM4_DEPLOYPROP deployment0_ where deployment0_.KEY_='pdid' and deployment0_.STRINGVAL_='
| 15' ) where rownum <= ?
The above query obviously fails as JBPM4_DEPLOYPROP is totally empty.
Any ideas what I may be doing wrong?
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4261197#4261197
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4261197
16 years, 5 months
[jBPM Users] - timer not signalling to right transition
by freak182
Hello,
I have this process:
| <task-node name="Investigate">
| <task name="INV_LOAN">
| ..............
| </task>
| <timer duedate="1 minute" name="task_timer" transition="End Application">
|
| <action class="org.wicket.jbpm.engine.handlers.TimerAction"></action>
| </timer>
| <transition to="fork1" name="Loan Review"></transition>
| <transition to="End Loan Application" name="End Application"></transition>
| </task-node>
|
TimerAction is:
| public void execute(ExecutionContext context) throws Exception
| {
|
| jbpmEngine.endTimerTask(context);
| }
|
| @Override
| protected void initialiseHandler(BeanFactory factory)
| {
| jbpmEngine = (JbpmCoreEngine) factory.getBean("wf_core_engine");
| }
|
CoreEngine is:
| public void endTimerTask(ExecutionContext context)
| throws WicketJbpmException
| {
|
| try
| {
| final Collection<TaskInstance> tasks = context
| .getTaskMgmtInstance().getTaskInstances();
| for (TaskInstance tasksInts : tasks)
| {
|
| if (!tasksInts.hasEnded())
| {
| tasksInts.end();
| log.info("task name: " + tasksInts.getName() + " has ended.");
| }
| }
| // finally save the process instance contain here in timers
| context.getJbpmContext().save(
| context.getToken().getProcessInstance());
|
when the time is up it always take the: Loan Review transition.
am i missing something?
im using 3.3.1.GA
thanks a lot.
cheers.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4261195#4261195
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4261195
16 years, 5 months
[jBPM Users] - Re: [jBPM4] Synchronous process execution
by kukeltje
you call it a process, I call it a micro-flow... or orchestration or... what's in a name. You could also you bpel or something else for this.
>From a nice article:
anonymous wrote : I already have a service execution pipeline, why do I need additional service orchestration mechanisms?
|
| It might seem that that there is a lot of overlap between a service pipeline and service orchestration. In a nutshell, a service pipeline is a sequential orchestration of actions. The things that it does not support well, but are common orchestration requirements, are decisions, conditional transitions and parallel execution. Although technically you can do a lot these things as part of pipeline definition, it's not always easy. Our preference is to use a service pipeline for bringing together basic business functionality and additional infrastructure support, including data transformation, execution monitoring, etc and use jBPM for orchestration of these services.
|
| Additional consideration for this choice can be deployment requirements. If the same action(s) is used in a lot of cases, it might make sense to separate it (them) into a separate service so that it will be deployed only once and use jBPM for orchestration.
The full article is an interesting read, but yes, it still is debatable.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4261150#4261150
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4261150
16 years, 5 months
[jBPM Users] - Duplicate KEYs/Indexes on JBPM tables
by jeckles933
JBPM 3.2.6 SP 1
MYSQL 5.0.51a-log
Most of the tables have duplicate keys, this is just one example
CREATE TABLE `jbpm_token` (
`ID_` BIGINT(20) NOT NULL AUTO_INCREMENT,
`VERSION_` INT(11) NOT NULL,
`NAME_` VARCHAR(255) DEFAULT NULL,
`START_` DATETIME DEFAULT NULL,
`END_` DATETIME DEFAULT NULL,
`NODEENTER_` DATETIME DEFAULT NULL,
`NEXTLOGINDEX_` INT(11) DEFAULT NULL,
`ISABLETOREACTIVATEPARENT_` BIT(1) DEFAULT NULL,
`ISTERMINATIONIMPLICIT_` BIT(1) DEFAULT NULL,
`ISSUSPENDED_` BIT(1) DEFAULT NULL,
`LOCK_` VARCHAR(255) DEFAULT NULL,
`NODE_` BIGINT(20) DEFAULT NULL,
`PROCESSINSTANCE_` BIGINT(20) DEFAULT NULL,
`PARENT_` BIGINT(20) DEFAULT NULL,
`SUBPROCESSINSTANCE_` BIGINT(20) DEFAULT NULL,
PRIMARY KEY (`ID_`),
KEY `IDX_TOKEN_PARENT` (`PARENT_`),
KEY `IDX_TOKEN_PROCIN` (`PROCESSINSTANCE_`),
KEY `IDX_TOKEN_NODE` (`NODE_`),
KEY `IDX_TOKEN_SUBPI` (`SUBPROCESSINSTANCE_`),
KEY `FK_TOKEN_SUBPI` (`SUBPROCESSINSTANCE_`),
KEY `FK_TOKEN_PROCINST` (`PROCESSINSTANCE_`),
KEY `FK_TOKEN_NODE` (`NODE_`),
KEY `FK_TOKEN_PARENT` (`PARENT_`),
CONSTRAINT `FK_TOKEN_NODE` FOREIGN KEY (`NODE_`) REFERENCES `jbpm_node` (`ID_`),
CONSTRAINT `FK_TOKEN_PARENT` FOREIGN KEY (`PARENT_`) REFERENCES `jbpm_token` (`ID_`),
CONSTRAINT `FK_TOKEN_PROCINST` FOREIGN KEY (`PROCESSINSTANCE_`) REFERENCES `jbpm_processinstance` (`ID_`),
CONSTRAINT `FK_TOKEN_SUBPI` FOREIGN KEY (`SUBPROCESSINSTANCE_`) REFERENCES `jbpm_processinstance` (`ID_`)
) ENGINE=INNODB DEFAULT CHARSET=latin1
Note these Keys:
KEY `IDX_TOKEN_PARENT` (`PARENT_`),
KEY `FK_TOKEN_PARENT` (`PARENT_`),
This is just one example, there are duplicate keys on almost all the tables.
This table was created using the script that came with 3.2.6 SP1.
Is there a reason for these duplicate keys??
Or is this a bug in the DB create script?
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4261117#4261117
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4261117
16 years, 5 months
[jBPM Users] - Re: Catching invalid transition names in jBPM4
by sebastian.s
Honestly I can't answer your last question. But what about just trying to call execution.take(transitionName) and catching the exception in case of an invalid name?
anonymous wrote :
| void take(java.lang.String transitionName)
|
| takes the outgoing transition with the given name.
|
| This method can only be called from inside ExternalActivityBehaviour implementations.
|
| Transitions will be looked up recursively starting from the current activity and then up the activity-parent-hierarchy
|
| Parameters:
| transitionName - is the name of the transition to take. A null value will match the first unnamed transition.
| Throws:
| JbpmException - in case no such transition is found in the current activity or in case this method is called from inside an ActivityBehaviour.
|
|
|
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4261104#4261104
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4261104
16 years, 5 months
[jBPM Users] - Re: Catching invalid transition names in jBPM4
by bwestrich
Interesting to know that signal names have such flexibility. And I can imagine situations where that might be useful.
However, the way I've used jBPM 3.2.3, if I send a process instance a signal, I expect the signal to cause a transition (even if the transition is to the same state). So I add validation code between the client and the executing business process that notifies the client if they pass in a signal which is not a valid transition (and thus will not cause a transition).
I think I just figured out a way of doing such a validation using 4.x: Cast the Execution (interface) to an ExecutionImpl, call getActivity() to get the ActivityImpl, then call findOutgoingTransition(String name). If findOutgoingTransition returns a null, the transition is not valid. The below code shows this approach, as well as a way to list all valid transitions.
public class FirstEnterHandler implements ExternalActivityBehaviour {
| public void execute(ActivityExecution execution) throws Exception {
| String transitionName = "byListener?";
| ExecutionImpl executionImpl = (ExecutionImpl) execution;
| ActivityImpl activity = executionImpl.getActivity();
| TransitionImpl transition = activity.findOutgoingTransition(transitionName);
| if (transition == null) {
| String validTrans = activity.getOutgoingTransitions().toString();
| throw new RuntimeException("invalid transition " + transitionName
| + ", valid transitions are : " + validTrans);
| }
| execution.take(transitionName);
| }
| }
Even if this code works, it seems like a lot of use of internal implementation classes. Is this approach an ok way to validate signal names?
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4261101#4261101
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4261101
16 years, 5 months