Hi, I am new to jBPM implementation, right now im having problem assigning task and start the task. Below are code snippet that will trigger the assign task. Basically i want to assign the actor to the task base on the task id and clears the pooled actors (this is to make sure only one person are doing the task).
JbpmContext jbpmContext = null;
try{
JbpmConfiguration jbpmConfiguration = JbpmConfiguration.getInstance();
jbpmContext = jbpmConfiguration.createJbpmContext();
TaskInstance taskInstance = jbpmContext.getTaskInstance(62); // Hardcoded Instance Id
taskInstance.setActorId("82123111245");
taskInstance.start();
List<String> userIds = new ArrayList<String>();
taskInstance.setPooledActors((String[])userIds.toArray(new String[0]));
jbpmContext.save(taskInstance);
}catch(JbpmPersistenceException ex){
System.out.println("-@Claim Task--Actor not found--");
}
But right now there're nothing happening over the jBPM Console. The task is still not assigned ,started and there are no errors on the server log.
Many thanks in advance.