Discussion:
[jboss-user] [jBPM] - Re: JBPM 5.1 Final Release with jboss-5.1.0.GA - Human Task taskId
Samrat Roy
2012-03-29 07:16:41 UTC
Permalink
Samrat Roy [https://community.jboss.org/people/whizkid.samrat] created the discussion

"Re: JBPM 5.1 Final Release with jboss-5.1.0.GA - Human Task taskId"

To view the discussion, visit: https://community.jboss.org/message/727103#727103

--------------------------------------------------------------
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 :-/
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/727103#727103]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Kris Verlaenen
2012-04-02 21:23:36 UTC
Permalink
Kris Verlaenen [https://community.jboss.org/people/KrisVerlaenen] created the discussion

"Re: JBPM 5.1 Final Release with jboss-5.1.0.GA - Human Task taskId"

To view the discussion, visit: https://community.jboss.org/message/727852#727852

--------------------------------------------------------------
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
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/727852#727852]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Samrat Roy
2012-04-03 04:52:02 UTC
Permalink
Samrat Roy [https://community.jboss.org/people/whizkid.samrat] created the discussion

"Re: JBPM 5.1 Final Release with jboss-5.1.0.GA - Human Task taskId"

To view the discussion, visit: https://community.jboss.org/message/727894#727894

--------------------------------------------------------------
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 :)
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/727894#727894]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Dhaval Shah
2013-02-06 12:59:16 UTC
Permalink
Dhaval Shah [https://community.jboss.org/people/shahdhaval2020] created the discussion

"Re: JBPM 5.1 Final Release with jboss-5.1.0.GA - Human Task taskId"

To view the discussion, visit: https://community.jboss.org/message/796339#796339

--------------------------------------------------------------
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.
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/796339#796339]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
priyakpandey
2012-04-03 09:08:18 UTC
Permalink
priyakpandey [https://community.jboss.org/people/priyakpandey] created the discussion

"Re: JBPM 5.1 Final Release with jboss-5.1.0.GA - Human Task taskId"

To view the discussion, visit: https://community.jboss.org/message/727932#727932

--------------------------------------------------------------
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.
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/727932#727932]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
William Timpany
2012-04-26 10:39:38 UTC
Permalink
William Timpany [https://community.jboss.org/people/wtimpany] created the discussion

"Re: JBPM 5.1 Final Release with jboss-5.1.0.GA - Human Task taskId"

To view the discussion, visit: https://community.jboss.org/message/732372#732372

--------------------------------------------------------------
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
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/732372#732372]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Loading...