-
1. Re: JBPM 5.1 Final Release with jboss-5.1.0.GA - Human Task taskId
krisverlaenen Jun 28, 2011 8:10 PM (in response to priyakpandey)You can't get it from the on-entry action, as the task simply doesn't exist yet at that point, sorry.
Kris
-
2. Re: JBPM 5.1 Final Release with jboss-5.1.0.GA - Human Task taskId
priyakpandey Jun 28, 2011 10:09 PM (in response to krisverlaenen)Thank you for your reply.
Will try other options
-
3. Re: JBPM 5.1 Final Release with jboss-5.1.0.GA - Human Task taskId
whizkid.samrat Mar 29, 2012 3:16 AM (in response to priyakpandey)I am facing the same problem .
Kindly suggest the best way to retrieve the taskID . Getting tasks by users seem like an unsure method as the processInstance can have multiple active tasks allocated to the same user at the same time.
Help is requested
-
4. Re: JBPM 5.1 Final Release with jboss-5.1.0.GA - Human Task taskId
krisverlaenen Apr 2, 2012 5:23 PM (in response to whizkid.samrat)Could you describe what you are trying to do? Where do you need to the task id and what would you use it for?
Kris
-
5. Re: JBPM 5.1 Final Release with jboss-5.1.0.GA - Human Task taskId
whizkid.samrat Apr 3, 2012 12:51 AM (in response to krisverlaenen)sure thing ,
The jbpm5 Api suggests that to complete a task allocated to a user (in order to move the flow forward) i need to have a taskId.
public void complete( long taskId, String userId, ContentData outputData,TaskOperationResponseHandler responseHandler );
We are making a tender approval flow with human approvals, so as soon as a task is assigned to an approver , we want to capture the generated task id and current assignee and persist those along with the model data in our own tables, so as soon as the current assignee (Approver) takes an action, i would immediately know the taskID and hit the API , thus I need not bother about taskLists and fetching tasksAllocated to a user.
The second thought is , Task object is internal to jbpm & contains nothing specific to the object (Model) on which the workflow is running , so even if a get a list of tasks allocated to a user, would it not require a seperate logic to identify which taskId corresponds to which process flow ?
Hence the question.
Maybe I am missing the point somewhere , a nudge in the right direction is appreciated
-
6. Re: JBPM 5.1 Final Release with jboss-5.1.0.GA - Human Task taskId
priyakpandey Apr 3, 2012 5:08 AM (in response to krisverlaenen)I need task Id for application Integration purpose.
I have an application which has its own portal and Process Creation/Task Completion etc. on JBPM is done using ReST calls to jbpm server.
My application has its own view and displays the information in its own way. This application needs to store the taskId so that it can fetch the task data/details from jbpm as required.
-
7. Re: JBPM 5.1 Final Release with jboss-5.1.0.GA - Human Task taskId
wtimpany Apr 26, 2012 6:39 AM (in response to priyakpandey)I am not sure if this will be of use, but we do a similar thing.
We create a relation between a "Human Task" and our own Application Model. Since the Task ID does not exist before the Task is persisted, we pass our own Model Object ID to the Task. I did not want to extend the Task Object to hold our FK, so I decided to use the "Priority" field in the Task to store the reference (this may have to change in the future if we need to use priorities). The reason for not extending the Task, was that I wanted to use the vanilla JBPM code.
We have a Script Task before the Human Task to inject our Model FK ID into the context, then use this context variable in the Task.
Script Task: not the real code but it gives the idea.
// -- getBeanId returns Integer
kcontext.setVariable("myExternalModelID", MyExternalModelBean.getBeanId() );
Human Task:
Priority property: #{myExternalModelID}
Doing it this way alows us to then Join our Model Bean to the JBPM Task: MyExternalModelBean.beanId == Task.priority
-
8. Re: JBPM 5.1 Final Release with jboss-5.1.0.GA - Human Task taskId
shahdhaval2020 Feb 6, 2013 7:59 AM (in response to whizkid.samrat)Hi All,
i want to make user registartion form in JBPM 5 ,need an help on how to make this example .Any link or example on it would be a great help.