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