[jboss-user] [jBPM Development] - Assign task in jBPM
Johan Arif Ariffin
do-not-reply at jboss.com
Sun Aug 29 21:53:31 EDT 2010
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("- at 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&containerType=14&container=2035]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20100829/3bdf0707/attachment-0001.html
More information about the jboss-user
mailing list