[JBoss jBPM] - Re: create-task=
by ahmadyan
"ahmadyan" wrote : Hi,
| <task-node create-task="false" name="task-node-1" >
|
| <assignment class="MyRoleAssignmentHandler"
| config-type="bean">
| RoleName
|
|
|
| <action class="CreateMultiTask"
| config-type="bean"
| name="createMultiplyRepairTask"
| create-task="false">
|
|
|
| </task-node>
|
there was a typo error in post, Correction:
<task-node create-task="false" name="task-node-1" >
| <task name="task1" description="t">
| <assignment class="MyRoleAssignmentHandler"
| config-type="bean">
| <roleName>rolename </roleName>
| </assignment>
| </task>
| <event type="node-enter">
| <action class="CreateMultiTask"
| config-type="bean"
| name="createMultiplyRepairTask"
| create-task="false">
| </action>
| </event>
| <transition to="serviceFinished"></transition>
| </task-node>
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4180504#4180504
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4180504
15 years, 9 months
[JBoss jBPM] - Re: create-task=
by ahmadyan
"ahmadyan" wrote : Hi,
| <task-node create-task="false" name="task-node-1" >
|
| <assignment class="MyRoleAssignmentHandler"
| config-type="bean">
| RoleName
|
|
|
| <action class="CreateMultiTask"
| config-type="bean"
| name="createMultiplyRepairTask"
| create-task="false">
|
|
|
| </task-node>
|
there was a typo error in post, Correction:
<task-node create-task="false" name="task-node-1" >
| <task name="task1" description="t">
| <assignment class="MyRoleAssignmentHandler"
| config-type="bean">
| <roleName>rolename </roleName>
| </assignment>
| </task>
| <event type="node-enter">
| <action class="CreateMultiTask"
| config-type="bean"
| name="createMultiplyRepairTask"
| create-task="false">
| </action>
| </event>
| <transition to="serviceFinished"></transition>
| </task-node>
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4180503#4180503
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4180503
15 years, 9 months
[JBoss jBPM] - create-task="false" does not wok
by ahmadyan
Hi,
I wanted to dynamically create my tasks, hence I put this task-node:
<task-node create-task="false" name="task-node-1" >
<assignment class="MyRoleAssignmentHandler" config-type="bean">
RoleName
<action class="CreateMultiTask"
config-type="bean"
name="createMultiplyRepairTask"
create-task="false">
</task-node>
with the following actionHandler:
public class CreateMultiTask implements ActionHandler {
public void execute(ExecutionContext executionContext) throws Exception {
Token token = executionContext.getToken();
TaskMgmtInstance tmi = executionContext.getTaskMgmtInstance();
TaskNode taskNode = (TaskNode) executionContext.getNode();
// Assignee:
Vector roleInstanceSet = (Vector) tmi.getProcessInstance().getContextInstance().getVariable("__assignee");
if ( roleInstanceSet == null ) throw new Exception("Role instance set is null . ..");
// Task
Task task = taskNode.getTask( tmi.getProcessInstance().getContextInstance().getVariable("__task").toString());
for( Long ri : roleInstanceSet ){
TaskInstance ti = tmi.createTaskInstance(task, executionContext);
ti.setActorId("$RI_" + ri.toString());
}
}
}
it does as it supposed to do, it creates some task based myActionHandler but also it create one additional task than expected ( the default task for task-node, which is defined in the task tag. ) it seems that create-task="false" does not work.
any comments or suggestion are welcome.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4180502#4180502
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4180502
15 years, 9 months