-
1. Re: Create task for user group
krisverlaenen Jun 24, 2011 10:42 AM (in response to ranjithrp)Hi,
Did you register your group before trying to assign a task to it (similar to how you register a User, e.g. using TaskServiceSession.addGroup(..) or using a config file to load users/groups)?
Kris
-
2. Re: Create task for user group
ranjithrp Jun 27, 2011 1:43 AM (in response to krisverlaenen)Thanks Kris for the reply. It worked. I was in the assumption that jBPM task manager would add the user/usergroup assigned to a task automatically.
Im still stuck with editting a task. All im able to see is i can add a new task, but how can i edit an already existing task?
-
3. Re: Create task for user group
krisverlaenen Jun 27, 2011 12:35 PM (in response to ranjithrp)The service does not allow you to just edit a task at random. There are a lot of methods that allow you to update the life cycle or associate data with the task. In general, this should be sufficient for most use cases, as you aren't really allowed to change a task at random, only use the supported life cycle methods.
What type of data specifically do you want to change?
Kris
-
4. Re: Create task for user group
ranjithrp Jun 28, 2011 12:34 AM (in response to krisverlaenen)Hi Kris,
With the lifecycle methods i was able to change the status etc of the tasks. But what i was looking for was something like an admin user changing the priority of the tasks or a user adding additional comments to the existing tasks.
Can you point me to some documentation about the usage of these methods (jBPM 5 user guide doesnt have much about the lifecycle management i guess)
Thanks
Ranjith
-
5. Re: Create task for user group
krisverlaenen Jun 28, 2011 7:43 PM (in response to ranjithrp)The TaskClient is the API that you should be using for normal operations, and it's defined by the WS-HumanTask specification.
At this point, there are no operations to simply modify a Task randomly, as it's not defined in the specification. It shouldn't be too difficult to add, if you just look at TaskServiceSession.addTask, I guess we could just add a similar one for saveTask that would just save the task using the entity manager. If you might be interested in giving that a try, I can try and help and guide you through it?
Kris
-
6. Re: Create task for user group
ranjithrp Jun 29, 2011 7:13 AM (in response to krisverlaenen)I was able to create a custom API for saveTask by following the lines of TaskServiceSession.addTask method. But i was not sure if that was the right approach and if there is any inbuilt API which can be used for this.
Thanks Kris for the suggestions. I would reach out if i have any other questions.
Thanks
Ranjith