conductor icon indicating copy to clipboard operation
conductor copied to clipboard

decision task

Open amoolya19 opened this issue 9 years ago • 6 comments

Hi @v1r3n ,

I was trying to make a decision making task in workflow. workflow takes input as number: . Based on this number whether its odd or even, decision should be taken. As input is an user input it could be anything . where to have a logic to find out whether the input is even or odd?

in kitchen example, decisoin task input is like "oddEven": "${task_2.output.oddEven}". i could not make out how task_2 is generating "0" or "1".

amoolya19 avatar Apr 10 '17 10:04 amoolya19

@amoolya19 this logic will be implemented in a worker that takes the input from workflow and outputs the odd/even as true/false, 1/0 or any other value. Conductor will not any math out of the box.

v1r3n avatar Apr 10 '17 19:04 v1r3n

if i implement worker how to use it ? i am using only json based workflow definitions.

amoolya19 avatar Apr 11 '17 09:04 amoolya19

you will implement a new task type (look at the HTTP task implementation) and use it in your json definition with task type as the one you created.

v1r3n avatar Apr 11 '17 20:04 v1r3n

@v1r3n,

yes, but what i asked is if i implement a new task type say "TEST" how can i import this jar /class into conductor? or do i have to do some configuration for this to make conductor understand this.

com.netflix.conductor.contribs.http.HttpTask is the one you are referring i assume. i dint see worker class impl or WorkflowTaskCoordinator class usage. Is my understanding wrong?

amoolya19 avatar Apr 13 '17 09:04 amoolya19

can we use ecpression in the case ? like this ${workflow.input.number}%2=0

amoolya19 avatar Apr 27 '17 11:04 amoolya19

@amoolya19 we are planning to add expression support for decision task sometime in Q2 of 2017.

v1r3n avatar May 04 '17 19:05 v1r3n