Johan Arif Ariffin [
http://community.jboss.org/people/metku] created the discussion
"Assign task in jBPM"
To view the discussion, visit:
http://community.jboss.org/message/559460#559460
--------------------------------------------------------------
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.
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/559460#559460]
Start a new discussion in jBPM Development at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]