Topic
  • 6 replies
  • Latest Post - ‏2013-01-06T20:32:38Z by SystemAdmin
SystemAdmin
SystemAdmin
7615 Posts

Pinned topic Starting a task using InstanceId

‏2013-01-03T20:22:22Z |
Dears I'm trying to design a process application that is triggered in all stages by URLs, I can trigger the first service and get the instance id, How can I call the next service using Instance Id via URL.
Updated on 2013-01-06T20:32:38Z at 2013-01-06T20:32:38Z by SystemAdmin
  • kolban
    kolban
    3316 Posts

    Re: Starting a task using InstanceId

    ‏2013-01-03T22:00:16Z  
    Typically, a BPM process is described as a series of steps modeled in BPMN. In the product this is the BPD diagram. Each step is then implemented. Commonly the steps are implemented as Human Services which are screens to be shown to the user. When the user completes the human service, the BPMN flow is then followed to the next step in the process typically to a different person. Staff members use a process portal to see a list of tasks awaiting their attention, select one and hence see the screen and data associated with it.

    When a BPD is started, it has an associated "instance id" which is the instance of the process in question. When tasks are in the task list, they are also associated with the BPD instance ID.

    Can you clarify what you mean by "the next service using Instance Id"?

    Neil
  • SystemAdmin
    SystemAdmin
    7615 Posts

    Re: Starting a task using InstanceId

    ‏2013-01-04T02:18:01Z  
    Thanks very much for your clarification and reply. I'm working on a project where Process Portal will not be used to complete tasks and this will be done through a business application, that is why we are trying to trigger the service using Instance Id or activity Id from a URL.
  • kolban
    kolban
    3316 Posts

    Re: Starting a task using InstanceId

    ‏2013-01-04T15:19:21Z  
    Thanks very much for your clarification and reply. I'm working on a project where Process Portal will not be used to complete tasks and this will be done through a business application, that is why we are trying to trigger the service using Instance Id or activity Id from a URL.
    IBM BPM provides a rich set of REST APIs that can be used to query tasks as well as obtain URLs used to show the tasks. Perhaps this is of value to you?

    Neil
  • SystemAdmin
    SystemAdmin
    7615 Posts

    Re: Starting a task using InstanceId

    ‏2013-01-04T15:21:24Z  
    Thanks very much for your clarification and reply. I'm working on a project where Process Portal will not be used to complete tasks and this will be done through a business application, that is why we are trying to trigger the service using Instance Id or activity Id from a URL.
    Well, given an instance ID, you can use the JS API to get the tasks associated with that instance. However, can you explain in greater detail what you mean by "…and this will be done through a business application…" Are you saying that you have a separate UI that will direct users to the task URL? Meaning are the users actually, in the end, running tasks that use coaches, or are they working in a completely separate UI and the results are being put into the process via some other mechanism.

    If you are doing the first (using a different UI to get tasks to the users) then I would look at the REST API. If you modeled your process properly it should rarely be the case that a user has multiple tasks in a row for the same instance. If that were the case then all of those tasks should, IMO, be modeled as a single activity, perhaps one that is comprised of multiple services and coaches. Given that, then for a given user requesting "the next task for this instance" really makes little sense because the next task would be one that had to be handled by someone else, not the current user.

    So I think really what you want is "give me the next task in my task list", which would be the task for any instance. The search API can do this for you.

    One of the reasons modeling multiple tasks in a row for the same participant is a poor practice is that the creation of tasks is asynchronous. So if you complete the first task, the 2nd task can take a few seconds to be created and ready to run. Whereas if both steps are part of a single activity, then the user can move seamlessly between them.

    Andrew Paier | Director of Special Operations | BP3 Global, Inc. www.bp-3.com
  • SystemAdmin
    SystemAdmin
    7615 Posts

    Re: Starting a task using InstanceId

    ‏2013-01-04T17:53:07Z  
    As a start...Thanks for your support. In fact I'm still using coaches but In a separate UI than process Portal. I'm calling each Human Service via its URL, showing the coach for the user where he can complete the task.

    I'm thinking of a web service which will get the taskid from rest API and form the proper URL..Will give that a try.
  • SystemAdmin
    SystemAdmin
    7615 Posts

    Re: Starting a task using InstanceId

    ‏2013-01-06T20:32:38Z  
    Thanks very much...Could do with REST API via JAVA....much appreciated!