Collecting information for your query, please wait......
I can see you're discussing ways to get the invoking task information from a pipeline runtime. Let me search for more comprehensive information about accessing runtime information and the specific APIs you mentioned. Based on the information you've shared and the search results, I can provide some insights about accessing the invoking task name during pipeline runtime: ## Current Limitations You're correct in your observation that **getting the invoking task name during live runtime appears to be limited**. The 404 response you're getting when trying to use pipe.ruuid with the runtime API during execution suggests that the runtime information isn't immediately available through the public API while the pipeline is still running. ## Available Runtime Information During pipeline execution, you have access to several pipeline properties through expressions: ### Pipeline Runtime Properties - **pipe.ruuid** - The runtime UUID of the current pipeline execution - **pipe.rootRuuid** - The root runtime UUID (top-level execution started by a Task or user) - **pipe.parentRuuid** - The runtime UUID of the parent pipeline (if this is a child pipeline) - **pipe.user** - The ID of the user that executed the pipeline - **pipe.startTime** - The start time of the pipeline execution ## Post-Execution Solution Your suggested approach using the **GET /runtime/{env_org}/{ruuid}** API after pipeline completion is indeed the correct method: 1. **During execution**: Capture pipe.ruuid in your pipeline 2. **After completion**: Use the public API to retrieve the full execution details 3. **Extract invoker information**: The response includes "invoker_name" field that contains the task name ## Alternative Approaches ### 1. Pipeline Parameters If you control the task execution, you could pass the task name as a pipeline parameter: - Configure your task to pass the task name as a parameter - Access it during runtime using pipe.args["task_name"] ### 2. Environment Variables Some organizations use environment variables or global parameters to track execution context. ## API Response Structure When you successfully call the runtime API post-execution, you'll get a response containing:
json
{
"response_map": {
"invoker": "[email protected]",
"invoker_name": "Your Task Name",
"ruuid": "your-runtime-uuid",
"state": "Completed",
// ... other execution details
}
}
Your approach of using the runtime API after pipeline completion is currently the most reliable method to obtain the invoking task name, as the runtime metadata isn't fully accessible via public APIs during live execution.
I can help clarify this question about accessing invoking task information during pipeline runtime! Based on the search results, I can help clarify the question about getting invoking task information from a pipeline runtime during execution. ## Getting Invoking Task Information During Pipeline Runtime You're correct that it's **not directly possible** to get the invoking task information from within the pipeline itself during live runtime execution. However, there are several approaches you can use: ### 1. **Pipeline Parameters and Context** During runtime, you can access some limited context information: - **Pipeline parameters**: Use _parameter_name to access pipeline parameters - **Query parameters**: For triggered tasks, use _QUERY_STRING to get all query parameters - **Pipeline context**: Access properties like pipe.user, pipe.startTime, pipe.ruuid, etc. ### 2. **Using SnapLogic Runtime APIs** The most reliable way to get invoking task information is through the **Runtime APIs**: #### Get Runtime Information API:
GET /runtime/{env_org}/{ruuid}
This API returns comprehensive information including: - invoker: The invocation method (e.g., "triggered", "scheduled", "manual", "always_on") - user_id: The user who triggered the execution - invoker_path_id: The project path of the invoker - pipe_invoker: Information about the invoking pipeline (if applicable) ### 3. **Practical Implementation** As shown in one of the search results, you can create a pipeline that: 1. Uses the Runtime API to get execution details 2. Filters for the current execution using the pipeline's RUUID 3. Extracts the invoker type from the API response **Key fields in the API response:** - invoker: Shows invocation type ("triggered", "scheduled", "manual", "always_on") - user_id: Shows who invoked the pipeline - create_time: Shows when the execution started ### 4. **Authentication Requirements** To use the Runtime APIs, you'll need: - Basic authentication with SnapLogic credentials - Appropriate permissions to view pipeline executions - The pipeline's Runtime ID (RUUID) which is available as pipe.ruuid ### **Conclusion** While you cannot directly access invoking task information from within the pipeline during runtime, you can use the SnapLogic Runtime APIs to retrieve this information by making an API call using the current pipeline's RUUID. This approach requires an additional API call but provides comprehensive information about how the pipeline was invoked.
I need to search for the correct way to get the task name that invoked a pipeline at runtime, since my previous suggestion of pipe.invoker_name was invalid. I apologize for the confusion with my earlier suggestion of pipe.invoker_name. After searching through the SnapLogic documentation, I can see that this property doesn't exist. Based on the search results, here are the **actual ways to get task-related information at runtime** in SnapLogic: ## Available Pipeline Properties for Task Information Unfortunately, there isn't a direct pipe.task_name or similar property to get the exact task name that invoked the pipeline. However, you can access these related properties: ### 1. **Pipeline Parameters** (Recommended Approach) The most reliable way is to pass the task name as a pipeline parameter: - **In the Task configuration**: Add a pipeline parameter like task_name with the actual task name as the value - **In your pipeline**: Access it using _task_name in expressions ### 2. **Available Pipeline Properties** From the documentation, these are the actual pipeline properties you can access: - pipe.label - The name of the pipeline (not the task) - pipe.user - The user who executed the pipeline - pipe.ruuid - The runtime UUID of the current pipeline execution - pipe.rootRuuid - The root runtime UUID (top-level execution started by task/user) - pipe.parentRuuid - The parent pipeline's runtime UUID (if called by Pipeline Execute) - pipe.startTime - When the pipeline started - pipe.hostname - The host running the pipeline - pipe.plexPath - The Snaplex path ### 3. **Request Arguments for Triggered Tasks** If using triggered tasks, you can access: - _QUERY_STRING - All query parameters as a string - _REMOTE_USER - The user who invoked the request - Custom parameters passed in the URL ## Recommended Solution **For Scheduled/Triggered Tasks**: Add a pipeline parameter in your task configuration: 1. In the task setup, add a parameter called task_name 2. Set its value to the actual task name 3. In your Mapper snap, use _task_name to access this value **For Pipeline Execute scenarios**: The calling pipeline can pass the task information as a parameter to the child pipeline. This approach gives you reliable access to the task name without depending on undocumented properties that may not exist.
I'll help you with the pipe.invoker_name expression issue. Let me search for information about this specific pipeline property. Based on the search results, I can see that pipe.invoker_name is not a valid pipeline property in SnapLogic's expression language. ## Valid Pipeline Properties The correct pipeline properties available in SnapLogic expressions are: - **pipe.args** - A map containing the pipeline parameters - **pipe.hostname** - The hostname of the host running the pipeline - **pipe.instanceId** - The UUID of the pipeline - **pipe.label** - The label of the pipeline - **pipe.parentRuuid** - The runtime UUID of the parent pipeline - **pipe.tmpDir** - A file URI to the temporary directory - **pipe.plexPath** - The path of the Snaplex - **pipe.projectPath** - The path to the pipeline's project in SLFS - **pipe.rootRuuid** - The root runtime UUID - **pipe.ruuid** - The runtime Universal Unique Identifier of the pipeline - **pipe.startTime** - The start time of the pipeline - **pipe.user** - The ID of the user that executed the pipeline ## What You Might Be Looking For If you're trying to identify who or what invoked the pipeline, you might want to use: - **pipe.user** - Returns the ID of the user that executed the pipeline (e.g., user@example.com) - **pipe.parentRuuid** - If the pipeline was started by a Pipeline Execute Snap, this returns the runtime UUID of the parent pipeline (returns null if no parent) ## Example Usage
javascript
// Get the user who executed the pipeline
pipe.user
// Check if pipeline has a parent (was invoked by another pipeline)
pipe.parentRuuid != null
If you need to track pipeline invocation details, consider using these valid pipeline properties instead of pipe.invoker_name.
