Can anyone help me in retrieving the successor activity of current activity in workflow?

  • 1 April 2014
  • 8 replies
  • 0 views

Badge +1

Hello everyone,

 

Need help in retrieving the activity name succeeding the current activity.

Each activity can have more than one event and can have more than one destination activity based on actions.

We need a method to get the Activity(s) succeeding the current activity.

 

Thanks for help.


8 replies

Badge +7

Hi Siri,


 


One way of doing that is by creating custom workflow reports against the activities and events in the workflow 


using the workflow reporting SmartObjects. Have a look at the attached document to see how:-) 


 


Hope this helps!


 


Regards


Nelly

Badge +8

Do you need to know this before your flow proceeds to the next action or after?

 

If it is after, you can use the Activity Instance SmartObject to see which activities have occurred (or are occuring).

 

If before, I can't think of a way to work that out without replicating alot of logic from your process into, e.g. an object that jumps through the requisite hoops to make the same decision your workflow would.

Badge +1

 

Yes, we need to know the next activity before flow proceeds to the next action

 

We are trying to build a WCF service to retrieve the next activity in the Workflow . So looking for an method in the API for achieving this.

 

Badge +8

Curious why you need to predict the future?  Is there a specific problem you are trying to resolve?

 

You can certainly accomplish this, but as I said, you will have to reproduce a lot of logic from your process in the WCF service.  And then you have two sets of logic that have to be maintained: one in the process, one in your service.

Badge +10

One simple way of doing that would be to use activity numbering in the name of the activity and then using the out of the box activity to get a list of activities for that process.

Badge +1

Please help me in understanding about the out of the box activity to get a list of activities?

We are trying to know the list of activities pending for a workflow to complete.

 

Badge +4

Hi Siri,


 


I am not sure if this is what  @s0m3one talked about but you can try the following.


 



  1. Open {SmartObject-Service-Tester} located in (“[Program Files]K2 BlackpearlBin”)
  2. Expand {SmartObject Explorer}
  3. Expand {Workflow Reports}
  4. Expand {Workflow General}
  5. Right click on {Activity Instance}
  6. Select {Execute SmartObject}
  7. Default the method should be list, Else go to {Method to Execute} and select (list/get list)
  8. Press Execute Button
  9. In results there is a {Status} Colum
  10. A list of all Activity’s will appear

 


Hope this helps.


 


Regards


Quintin

Badge +8

@Qunitin209: The Activity Instance SmartObject is only going to help with activities that have already started, not those that have yet to start.

 

@siri: The Process Activities SmartObject will tell you all activities in a particular process.  It requires knowledge of the Process ID (not the process instance ID), but this is available within your workflow.  Be aware of the following:

 

1) This is essentially just a list of strings.  There is no information that the status of an activity in a particular process, or even if a particular activity will be encountered in a particular process instance.

 

2) The list of activities could change as you create new versions of your process.

 

3) The list includes all activities in your process, with no regard to duration.  For example, if you have an activity that is a logical branch that takes no time to complete, it will be listed by this SmartObject.  So if your idea is to automatically "estimate" where a workflow is in terms of duration, these activities will skew your results.

Reply