how to create user task programmatically
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-03-2012 04:36 PM
How do we create a user task programmatically and assign to the existing process instance provided that I know the proc_inst_id_, task_def_key & task_name_ ?
In my use case, I need to create user task to the existing process instance only if certain condition is met.
-rohran
In my use case, I need to create user task to the existing process instance only if certain condition is met.
-rohran
Labels:
- Labels:
-
Archive
6 REPLIES 6

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-06-2012 05:11 AM
Hi,
Via the TaskService. You can use the newTask and saveTask methods.
Best regards,
Via the TaskService. You can use the newTask and saveTask methods.
Best regards,
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-23-2012 06:41 AM
Hi,
Via the TaskService. You can use the newTask and saveTask methods.
Best regards,
Hi,
There are no setter methods for processInstanceId or similar things,How we can attach newly created Task to processInstance ?!
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-23-2012 06:49 AM
This is not possible using public API. You would have to write a custom command. Have a look at the database tables first in order to understand how tasks and executions are linked.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-23-2012 06:57 AM
Thanks for your fast reply
I'v understood what you said, but I want to know that is this a bad approach to do that ?
I'v understood what you said, but I want to know that is this a bad approach to do that ?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-23-2012 07:09 AM
Hi hamed,
well, it depends. If you use internal API you might get burned if we change something internally. Public API is guaranteed to be stable.
I would always try very hard resolving something like this using the process diagram. Is there no way to model it in the process?
well, it depends. If you use internal API you might get burned if we change something internally. Public API is guaranteed to be stable.
I would always try very hard resolving something like this using the process diagram. Is there no way to model it in the process?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-23-2012 07:34 AM
Actually, I agree with you, but always there are issues that appear after processDefinition design and use(processInstance)!
e.g We need some feature that could be returned the running node to previous node(task), to do some editing or things like that. So, if I put all possibilities in diagram it would be a problem and complexity (I guess)
e.g We need some feature that could be returned the running node to previous node(task), to do some editing or things like that. So, if I put all possibilities in diagram it would be a problem and complexity (I guess)
