cancel
Showing results for 
Search instead for 
Did you mean: 

Capturing pipeline invocation type

nishant_k9
New Contributor II

Is there a way/expression to capture pipeline invocation type (i.e. Scheduled Task, Triggered Task, Manual).

1 ACCEPTED SOLUTION

bojanvelevski
Valued Contributor

Hey @nishant.k9,

There’s a way to capture the invoker type by using the elastic api. Basically we’re going to gather all executions of that particular pipeline, and separate only the last one (that’s the actual execution that’s going to trigger the elastic request). In the response there’s a field that points to the invoker type. Unfortunately there’s no parameter to separate the last execution, at least I don’t know one, that’s why I added one more snap with an expression that filters out the information we need.

You’ll need a basic auth account for the snaplogic elastic request. Note that this will work only upon execution, and if you want to validate and test, you’ll need to use Record Replay.

CaptureInvoker_2022_06_03.slp (4.2 KB)

Regards
Bojan

View solution in original post

4 REPLIES 4

JensDeveloper
Contributor II

Hi @nishant.k9 ,

Yes there is. You need to make use of the snaplogic list snap. It will get the metadata from snaplogic about pipelines/accounts/tasks, etc

So in this case:

  • A snaplogic List snap
  • The path of the project you want the tasks from
    The output you need to go to the metadata.type field.
    Scheduled : ''schedule"
    Ultra: “always-on”
    Triggered: “triggered”
    Configuration snap: SnapLogic List
    image
    image

Regards
Jens

@JensDeveloper
Thank you for the response, but i have bit different ask.
Like, consider there is a pipeline which is scheduled at some frequency. Now this pipeline can be executed in two way : one is manually by user and other is automatically by scheduler. So I want to capture specific runtime information whether the execution was manual or scheduled, for audit purpose.

bojanvelevski
Valued Contributor

Hey @nishant.k9,

There’s a way to capture the invoker type by using the elastic api. Basically we’re going to gather all executions of that particular pipeline, and separate only the last one (that’s the actual execution that’s going to trigger the elastic request). In the response there’s a field that points to the invoker type. Unfortunately there’s no parameter to separate the last execution, at least I don’t know one, that’s why I added one more snap with an expression that filters out the information we need.

You’ll need a basic auth account for the snaplogic elastic request. Note that this will work only upon execution, and if you want to validate and test, you’ll need to use Record Replay.

CaptureInvoker_2022_06_03.slp (4.2 KB)

Regards
Bojan

@bojanvelevski
Thank you… it somehow solved my problem