01-10-2012 08:15 PM
private Expression expression;
public void notify(DelegateTask delegateTask) {
String expression = this.expression.getValue(delegateTask).toString();
delegateTask.setVariableLocal("validationRule", expression);
}
2. In bpmn xml file, create a parallel gateway with 2 outgoing tasks: a simple user task and a user task with task listenerTaskService taskService = getProcessEngine().getTaskService();
taskService.complete(taskId);
6. Get the following stack trace:### Error updating database. Cause: java.sql.SQLException: The DELETE statement conflicted with the REFERENCE constraint "AC
T_FK_VAR_EXE". The conflict occurred in database "xxx", table "dbo.ACT_RU_VARIABLE", column 'EXECUTION_ID_'.
### The error may involve org.activiti.engine.impl.persistence.entity.ExecutionEntity.deleteExecution-Inline
### The error occurred while setting parameters
### Cause: java.sql.SQLException: The DELETE statement conflicted with the REFERENCE constraint "ACT_FK_VAR_EXE". The conflic
t occurred in database "xxx", table "dbo.ACT_RU_VARIABLE", column 'EXECUTION_ID_'.
at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:8)
at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:120)
at org.apache.ibatis.session.defaults.DefaultSqlSession.delete(DefaultSqlSession.java:131)
at org.activiti.engine.impl.db.DbSqlSession$DeleteById.execute(DbSqlSession.java:146)
at org.activiti.engine.impl.db.DbSqlSession.flushDeletes(DbSqlSession.java:444)
at org.activiti.engine.impl.db.DbSqlSession.flush(DbSqlSession.java:349)
at org.activiti.engine.impl.interceptor.CommandContext.flushSessions(CommandContext.java:147)
at org.activiti.engine.impl.interceptor.CommandContext.close(CommandContext.java:103)
at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:49)
at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:33)
at org.activiti.engine.impl.TaskServiceImpl.complete(TaskServiceImpl.java:144)
01-10-2012 09:08 PM
01-10-2012 09:39 PM
<?xml version="1.0" encoding="UTF-8" ?>
<definitions id="definitions" targetNamespace="http://activiti.org/bpmn20"
xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI"
xmlnsmgdc="http://www.omg.org/spec/DD/20100524/DC" xmlnsmgdi="http://www.omg.org/spec/DD/20100524/DI"
xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL">
<process id="ForkProcessDef" name="Fork Process Def">
<startEvent id="theStart" />
<sequenceFlow id="theStart_InitialFork" sourceRef="theStart" targetRef="InitialFork" />
<parallelGateway id="InitialFork" />
<sequenceFlow id="InitialFork_SimpleUser" sourceRef="InitialFork" targetRef="SimpleUser" />
<sequenceFlow id="InitialFork_UserwithListener" sourceRef="InitialFork" targetRef="UserwithListener" />
<userTask id="SimpleUser" name="Simple User" activiti:formKey="someform" activiti:assignee="someuser"></userTask>
<sequenceFlow id="SimpleUser_theEnd" sourceRef="SimpleUser" targetRef="theEnd" />
<userTask id="UserwithListener" name="User with Listener" activiti:formKey="someform" activiti:assignee="someuser">
<extensionElements>
<activiti:taskListener event='create' class='com.myorg.workflow.servicetask.CreateTaskListener'>
<activiti:field name='expression' stringValue='some expression value' />
</activiti:taskListener>
</extensionElements>
</userTask>
<sequenceFlow id="UserwithListener_theEnd" sourceRef="UserwithListener" targetRef="theEnd" />
<endEvent id="theEnd" />
</process>
</definitions>
01-12-2012 03:12 PM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.