execute_task
Execute compliance tasks with real data and automatically resolve dependencies on previous outputs, returning structured results and execution status.
Instructions
Execute a specific task with real data after collecting all required inputs.
**This tool executes tasks with REAL data, not sample data.**
If any input depends on a previous task's output and that output is not available,
the dependent task(s) MUST be executed first to obtain the real output.
===============================================================================
EXECUTION CONTEXT
===============================================================================
- This tool MUST be called after collecting the inputs for a task.
- Execution is sequential: execute Task 1 → then Task 2 → etc.
- No task may proceed until its dependent tasks have been executed.
- On execution failure, provide detailed error feedback.
===============================================================================
DEPENDENCY & REAL DATA HANDLING
===============================================================================
If a task requires input from a previous task (dataset, file, or structured output):
1. **Use real task output when available**
- If the dependent task was already executed and produced outputs:
→ Use those outputs as the input.
→ Do NOT generate synthetic/sample data.
→ Do NOT re-run the previous task unnecessarily.
2. **If required previous task output does NOT exist**
- The assistant MUST:
- Explain *why* execution of the previous task is required.
- Automatically execute the previous task (and any required tasks in the chain).
- **After execution, display all execution results and outputs.**
- NO user confirmation should be requested—only explanation.
- Use the REAL output from the executed task as input.
3. **If executing a required previous task fails**
- The assistant MUST:
- Explain clearly why the task failed.
- Ask the user to provide the required input data manually.
- User-provided data becomes the fallback input.
4. **Only execute what is needed**
- Execute ONLY the minimal set of tasks whose outputs are required.
- **Every executed task must have its results shown to the user immediately.**
===============================================================================
APPLICATION CONFIGURATION
===============================================================================
Application credentials are REQUIRED if the task's appType is NOT 'nocredapp'.
If the task requires application credentials (appType != 'nocredapp'):
- Application config must be provided with:
- appName: Application class name
- appURL: Application URL (optional, can be empty string)
- credentialType: Type of credentials
- credentialValues: Actual credential key-value pairs
- OR applicationId if using existing saved application
If the task's appType is 'nocredapp':
- Application configuration can be omitted (pass None or empty)
- The system will automatically use the hardcoded nocredapp application structure:
{
"applicationType": "NoCredApp",
"appURL": "",
"credentialType": "NoCred",
"credentialValues": {"Dummy": ""},
"appTags": {"appType": ["nocredapp"], "environment": ["logical"], "execlevel": ["app"]}
}
===============================================================================
TASK EXECUTION FLOW
===============================================================================
1. Receive task name and collected inputs
2. Check if any input depends on previous task output
3. For dependency inputs:
a. Check if previous task output exists
b. If not, execute previous task first
c. Use real output as input value
4. Prepare execution payload with real data
5. Call task execution API
6. Parse and return execution results with output file URLs
===============================================================================
REQUEST BODY FORMAT
=============================================================================== {
"taskname": "TaskName",
"application": {
"appName": "ApplicationClassName",
"appURL": "https://app.url.com",
"credentialType": "CredentialTypeName",
"credentialValues": {
"key1": "value1",
"key2": "value2"
},
"appTags": [Complete object from of 'appTags' from the task in the rule]
},
"taskInputs": {
"inputs": {
"InputName1": "value_or_file_url",
"InputName2": "value_or_file_url"
}
}
}===============================================================================
Args:
task_name: Name of the task to execute
task_inputs: Dictionary containing key-value pairs of task inputs
Format: {"input_name": "value" or file_url}
application: Optional application configuration for tasks requiring credentials
Format: {
"appName": "ApplicationClassName",
"appURL": "https://...",
"credentialType": "...",
"credentialValues": {...},
"appTags": [Complete object from of 'appTags' from the task in the rule]
}
OR {"applicationId": "existing-app-id", "appTags": [Complete object from of 'appTags' from the task in the rule]}
Returns:
Dict containing:
{
"success": bool,
"execution_status": "COMPLETED" | "FAILED",
"task_name": str,
"task_inputs": dict,
"outputs": dict, # Output file URLs and values
"errors": list,
"message": str,
"next_action": str
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| task_name | Yes | ||
| task_inputs | Yes | ||
| application | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||