cancel
Showing results for 
Search instead for 
Did you mean: 

Get the Step identifier for process call and groovy script

S0014399387
Explorer
0 Kudos

I'm using the Eclipse plugin. If you add a new step to the flow you can right click it, select technical information and see the ID of the step (for example CallActivity_6). I would like to have this identifier available in two cases:

  • Local integration process: I want to know which Process Call step is triggering the process
  • Groovy script: I want to know which script step is calling the Groovy script

I know that the message properties contain a parameter called ModelStepId which know the calling ID, but I cannot seem to obtain it (other than apply the toString function on the message properties).

So my question is: how to get the step identifier out of the properties map?

Thanks in advance!

Bram

Accepted Solutions (0)

Answers (2)

Answers (2)

Sriprasadsbhat
Active Contributor

Hello Bram,

As per my understanding there is no such property or header place holder available to retrieve the step Id.

For error scenarios ( where message gets failed ) then there is property : ${property.SAP_ErrorModelStepID} which captures the step id where error occurred or which caused the message failure.

Regards,

Sriprasad Shivaram Bhat

S0014399387
Explorer
0 Kudos

Hi Sriprasad,

Thanks for confirming. The id in case of an error is also a nice feature!

Best,

Bram

filipe_rieger
Explorer
0 Kudos

You can parse the message history to get the latest activity ID. With following script you will be able to identify the activity ID of the groovy script itself.

//Read Activity ID of groovy
    def messageHistories = message.getProperty(Exchange.MESSAGE_HISTORY).join(',')
    def lastCallActivity = messageHistories.substring(messageHistories.lastIndexOf("CallActivity"), messageHistories.length());
    def activityIDOfGroovy = lastCallActivity.substring(0, lastCallActivity.indexOf("]"));