This repository has been archived by the owner on Dec 13, 2023. It is now read-only.
Event /Event handler/WAIT type #2648
Unanswered
laxmikantb
asked this question in
Q&A
Replies: 1 comment 2 replies
-
Please refer to this getting started lab to acclimatize yourself with the event handlers and how to wire events with event handlers. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi I am trying event handler feature for my workflow need, attaching definition of tasks, workflow and how i start the workflow.
I do not see the results as expected, your help will be appreciated.
event handler
{
"name": "evt_handler_1",
"event": "conductor:evt_workflow:task_1",
"actions": [
{
"action": "start_workflow",
"start_workflow": {
"name": "workflow_1",
"version": 1
},
"expandInlineJSON": true
}
],
"active": true
}
workflow for event
{
"name": "evt_workflow",
"description": "A Simple workflow with event task",
"ownerEmail": "abc@abc.com",
"version": 1,
"tasks": [
{
"name": "task_1",
"taskReferenceName": "task_1",
"inputParameters": {
"sink": "conductor",
"ref_flow": "${workflow.input.ref_flow}"
},
"sink": "conductor",
"type": "EVENT",
"startDelay": 0
}
],
"schemaVersion": 2
}
Sub Workflow to be executed once EVENT get triggered - what i am doing wrong , I do not see workflow1 get executed.
{
"name": "workflow_1",
"description": "Gets date and returns year from it",
"schemaVersion": 2,
"ownerEmail": "abc@abc.com",
"version": 1,
"tasks": [
{
"name": "decide_task",
"taskReferenceName": "decide_format",
"type": "SWITCH",
"inputParameters": {
"case_value_param": "${workflow.input.format}"
},
"evaluatorType": "value-param",
"expression": "case_value_param",
"decisionCases": {
"DDMMYYYY": [
{
"name": "dateconvert_task_DDMMYYYY",
"taskReferenceName": "dateconvert_task_DDMMYYYY",
"inputParameters": {
"http_request": {
"uri": "http://localhost:8099/dateconvert_task_DDMMYYYY",
"method": "POST",
"contentType": "application/json",
"body": "${workflow.input}"
}
},
"type": "HTTP"
}
],
"defaultCase": [
{
"name": "date_to_year_deafaultCase",
"taskReferenceName": "date_to_year_deafaultCase",
"inputParameters": {
"http_request": {
"uri": "http://localhost:8099/date_to_year_deafaultCase",
"method": "POST",
"contentType": "application/json",
"body": "${workflow.input}"
}
},
"type": "HTTP"
}
]
}
}
],
"outputParameters": {
"response": "${decide_format.output.response.body}" --> i would like access output from decision task (defaultCase or DDMMYYY case as per switch value-param)
}
}
post /api/workflow/{name}
evt_workflow
1
request body
{
"ref_flow":"workflow_1",
"ref_task":"task_1",
"format":"DDMMYYYY"
}
What I am doing wrong ?
Also is conductor can trigger asynchronous task feature ? (Task with callback event handler/workflow event trigger)
Beta Was this translation helpful? Give feedback.
All reactions