Forum Discussion

tk42's avatar
tk42
New Contributor III
8 years ago

Is it possible to capture the name of the task that executed a pipeline at runtime?

We often send an email in our pipelines have certain errors, and we also have a lot of Tasks that drive the same pipeline(s) but with different params.

So it would be very helpful if when could send the name of the Task that started a failed pipeline within the email, making triage much more expedient and perhaps easier.

Is there and expression function/property that yields information about the Task? I may be missing something in the docs, but I have failed to find anything close.

Thanks,
TK

10 Replies

  • peter's avatar
    peter
    New Contributor III

    I have the same request.

    Is it possible to get the task name that was used to start a pipeline?

  • cstewart's avatar
    cstewart
    Former Employee

    The task name is not available, but the pipeline label is:

  • dmiller's avatar
    dmiller
    Former Employee

    And in the Pipeline Properties, if you select the checkbox to capture pipeline parameters, it will send the value of the parameters to the pipeline runtime history if the pipeline is run through a task or another pipeline with PipeExecute or ForEach.

  • tk42's avatar
    tk42
    New Contributor III

    Thanks for the replies, but we already include the label and other values of interest in the emails.

    We specifically need to know which Task (if any) caused the pipeline execution to occur.

    I know the Task is available in the runtime stats (under Extra Details tab): I was guessing that there was some “undocumented” way to get at that info.

    Thanks,
    TK

    • dmiller's avatar
      dmiller
      Former Employee

      If it is not documented, it is not publicly available. You would need to submit an enhancement request through Support.

  • robert_parks's avatar
    robert_parks
    New Contributor III

    Have you thought of adding a “Task” parameter and putting the name of the task in it?

    • tk42's avatar
      tk42
      New Contributor III

      We’ve considered that but are trying to avoid the amount of “retrofit” it would take to complete that, even incrementally.

      A built-in mechanism is preferred.

      -TK

      • jaybodra's avatar
        jaybodra
        New Contributor III

        Have you tried the Snaplogic API using rest API? You can specify state as scheduled/triggered and an email snap for notification or write it to cloud for logging purpose.

  • nickshore's avatar
    nickshore
    New Contributor II

    Same request also. Would be helpful to be get the task name.

    • j_angelevski's avatar
      j_angelevski
      Contributor III

      @nickshore,

      With the pipeline monitoring API, you can get the invoker of the pipeline which in this case is the task that called the pipeline. Please refer to the following documentation how to call the API: Pipeline Monitoring.
      Once you execute the API, you should be able to see a field called invoker_name ( found in $entity.response_map.invoker_name )