Method to Start an Activity

Method to Start an Activity

  

Hi,

i would like to know if there is any inbuilt action, which can be used to start an Activity explictly and continue the process.

The scenario : Applications are received and on some notification, the processing stops. A timer that runs at regular intervals, finds the different Applications and corresponding Activities which needs to be Run. Say it now finds that Application X, needs to be started from Activity 'Y'. How would i trigger Activity 'Y' through the timer?

Hi Ashwathram,

I'm assuming you are talking about BPT...

What kind of activity do you want to start? You can start ConditionalStart Activities using the System Action "ActivityStart".

Can you share a little bit more of details?

Cheers,

José


José Costa wrote:

Hi Ashwathram,

I'm assuming you are talking about BPT...

What kind of activity do you want to start? You can start ConditionalStart Activities using the System Action "ActivityStart".

Can you share a little bit more of details?

Cheers,

José


Hi Jose, 

Am looking to start Automatic activity.

I would also like to know, If i associate ConditionalStart activity with every Automatic activity, would the timer (that runs independently at regular intervals)  be able to differentiate the different Applications received for which the activity was started


Hi Ashwathram,

It will be able if you have a relationship between the Application and the ProcessId because the Conditional Start accepts a ProcessId as input parameter.

By the way, you mentioned in your first post that the process stops. How does it stops? In what kind of activity? And how do you stop it?

Cheers,

José

José Costa wrote:

Hi Ashwathram,

It will be able if you have a relationship between the Application and the ProcessId because the Conditional Start accepts a ProcessId as input parameter.

By the way, you mentioned in your first post that the process stops. How does it stops? In what kind of activity? And how do you stop it?

Cheers,

José

Hi Jose, 

Regarding the Conditional Start, 

if we use the inbuild action to start conditional start "Start XXXXX" it will have process id as an input parameter, 

but like u mention before  we can use ActivityStart action in the System espace to explisitly start the conditional Start, in this case we need ActivityID as an input parameter, 

which ActivityID that we should pass to this ActivityStart action?, since the Conditional Start is not started yet and there's no activity id for it


Regards,

Ari.


Hi Ari,

First of all, I don't think you really want to call ActivityStart, better use the Start ConditionalStart automatically generated action.

That being said, Conditional Start activities are instantiated as soon as the process starts, or as soon as the activity that has a connector to the Conditional Start closes. You can find a description of this here. I was looking for a nice diagram explaining how it works, but having a hard time with the current documentation. You can check the old documentation here for a slightly better graphical representation.

I don't think there's a "simple" way of getting these activities' Ids, but you can always query the meta-model for it:

Sources:

  • Activity
  • Activity_Definition

Joins

  • Activity ONLY WITH Activity_Definition

Filters:

  • Activity.Process_Id = YourProcessId & Activity.Status_Id = Entities.Activity_Status.Listening
  • Activity_Definition.Kind = Entities.Activity_Kind.ConditionalStart

where YourProcessId is the process instance your Conditional Start belongs to.

Jorge Martins wrote:

Hi Ari,

First of all, I don't think you really want to call ActivityStart, better use the Start ConditionalStart automatically generated action.

That being said, Conditional Start activities are instantiated as soon as the process starts, or as soon as the activity that has a connector to the Conditional Start closes. You can find a description of this here. I was looking for a nice diagram explaining how it works, but having a hard time with the current documentation. You can check the old documentation here for a slightly better graphical representation.

I don't think there's a "simple" way of getting these activities' Ids, but you can always query the meta-model for it:

Sources:

  • Activity
  • Activity_Definition

Joins

  • Activity ONLY WITH Activity_Definition

Filters:

  • Activity.Process_Id = YourProcessId & Activity.Status_Id = Entities.Activity_Status.Listening
  • Activity_Definition.Kind = Entities.Activity_Kind.ConditionalStart

where YourProcessId is the process instance your Conditional Start belongs to.


HI Jorge, 

yes agreed we should use the action provided by the conditional start, 

but in my case i need to explicitly start the conditional start, thanks for your solution

yes i manage to get the activity id by search from activity table that status is listening, this conditional start will always have listening Status, 


Thanks again Jorge, 


Cheers.

Ari

Hi, Ari,

# As said, the Conditional Start (ConditionalStart1) is instantiated when the main Process (Start)  or as soon as the activity that has a connector to the Conditional Start closes (dashed arrow from activity to conditional start) is called.

The BPT is here:

# When the Conditional Start is instantiated, the callback method onReady is called. So you can get the Conditional Start's activity ID in this callback:

# The conditional start is not yet "Started" when the onReady is called until you call it, in this case you want to do it explicitly. And we have save its ActivityID in onReady, so everything runs like a charm: 

regards,

#Box