processus
Version:
A simple node workflow engine
228 lines (227 loc) • 8.69 kB
JSON
{
"name": "Demo17",
"description": "A demo showing the condition handler in action.",
"tasks":{
"A Fake Task": {
"description": "An example Task with made up data to test the condition handler. Notice the absence of a handler.",
"blocking": true,
"parameters": {
"null value": null,
"number": 42,
"string": "hello, world",
"objectA": {
"description": "there's another object just like me"
},
"objectB": {
"description": "there's another object just like me"
}
}
},
"Test Condition Handler": {
"description": "Task to reference the previous task and test the condition handler",
"blocking": true,
"handler" : "../taskhandlers/conditionHandler",
"parameters": {
"conditions": {
"is the null value null?": {
"valueA": "$[tasks.A Fake task.parameters.null value]",
"operator": "IS",
"valueB": null
},
"is the null value not null?": {
"valueA": "$[tasks.A Fake task.parameters.null value]",
"operator": "IS NOT",
"valueB": null
},
"is number 42?": {
"valueA": "$[tasks.A Fake task.parameters.number]",
"operator": "IS",
"valueB": 42
},
"is number not 42?": {
"valueA": "$[tasks.A Fake task.parameters.number]",
"operator": "IS NOT",
"valueB": 42
},
"is number greater than 42?": {
"valueA": "$[tasks.A Fake task.parameters.number]",
"operator": "greater than",
"valueB": 42
},
"is number greater than or equals 42?": {
"valueA": "$[tasks.A Fake task.parameters.number]",
"operator": "greater or equals",
"valueB": 42
},
"is number less than 42?": {
"valueA": "$[tasks.A Fake task.parameters.number]",
"operator": "less than",
"valueB": 42
},
"is number less than or equals 42?": {
"valueA": "$[tasks.A Fake task.parameters.number]",
"operator": "less or equals",
"valueB": 42
},
"is the string hello, world?": {
"valueA": "$[tasks.A Fake task.parameters.string]",
"operator": "equals",
"valueB": "hello, world"
},
"is the string not hello, world?": {
"valueA": "$[tasks.A Fake task.parameters.string]",
"operator": "IS NOT",
"valueB": "hello, world"
},
"does the objectA match objectB?": {
"valueA": "$[tasks.A Fake task.parameters.objectA]",
"operator": "match",
"valueB": "$[tasks.A Fake task.parameters.objectB]"
},
"does the objectA not match objectB?": {
"valueA": "$[tasks.A Fake task.parameters.objectA]",
"operator": "!=",
"valueB": "$[tasks.A Fake task.parameters.objectB]"
},
"does the objectA match valueB?": {
"valueA": "$[tasks.A Fake task.parameters.objectA]",
"operator": "match",
"valueB": {
"description": "there's another object just like me"
}
},"is the non existing property null?": {
"valueA": "$[tasks.A Fake task.parameters.invalid property of data]",
"operator": "match",
"valueB": null
}
}
}
},
"is the null value null?": {
"blocking": true,
"handler": "../taskhandlers/logHandler",
"skipIf": "$[tasks.Test Condition Handlerparameters.conditions.is the null value null?.invalid]",
"parameters": {
"level": "info",
"log": "\n\nis the null value null? if you see this, the answer's YES\n"
}
},
"is the null value not null?": {
"blocking": true,
"handler": "../taskhandlers/logHandler",
"skipIf": "$[tasks.Test Condition Handlerparameters.conditions.is the null value not null?.invalid]",
"parameters": {
"level": "info",
"log": "\n\nis the null value not null? if you see this, the answer's YES\n"
}
},
"is number 42?": {
"blocking": true,
"handler": "../taskhandlers/logHandler",
"skipIf": "$[tasks.Test Condition Handlerparameters.conditions.is number 42?.invalid]",
"parameters": {
"level": "info",
"log": "\n\nis number 42? if you see this, the answer's YES\n"
}
},
"is number not 42?": {
"blocking": true,
"handler": "../taskhandlers/logHandler",
"skipIf": "$[tasks.Test Condition Handlerparameters.conditions.is number not 42?.invalid]",
"parameters": {
"level": "info",
"log": "\n\nis number not 42? if you see this, the answer's YES\n"
}
},
"is number greater than 42?": {
"blocking": true,
"handler": "../taskhandlers/logHandler",
"skipIf": "$[tasks.Test Condition Handlerparameters.conditions.is number greater than 42?.invalid]",
"parameters": {
"level": "info",
"log": "\n\nis number greater than 42? if you see this, the answer's YES\n"
}
},
"is number greater than or equals 42?": {
"blocking": true,
"handler": "../taskhandlers/logHandler",
"skipIf": "$[tasks.Test Condition Handlerparameters.conditions.is number greater than or equals 42?.invalid]",
"parameters": {
"level": "info",
"log": "\n\nis number greater than or equals 42? if you see this, the answer's YES\n"
}
},
"is number less than 42?": {
"blocking": true,
"handler": "../taskhandlers/logHandler",
"skipIf": "$[tasks.Test Condition Handlerparameters.conditions.is number less than 42?.invalid]",
"parameters": {
"level": "info",
"log": "\n\nis number less than 42? if you see this, the answer's YES\n"
}
},
"is number less than or equals 42?": {
"blocking": true,
"handler": "../taskhandlers/logHandler",
"skipIf": "$[tasks.Test Condition Handlerparameters.conditions.is number less than or equals 42?.invalid]",
"parameters": {
"level": "info",
"log": "\n\nis number less than or equals 42? if you see this, the answer's YES\n"
}
},
"is the string hello, world?": {
"blocking": true,
"handler": "../taskhandlers/logHandler",
"skipIf": "$[tasks.Test Condition Handlerparameters.conditions.is the string hello, world?.invalid]",
"parameters": {
"level": "info",
"log": "\n\nis the string hello, world? if you see this, the answer's YES\n"
}
},
"is the string not hello, world?": {
"blocking": true,
"handler": "../taskhandlers/logHandler",
"skipIf": "$[tasks.Test Condition Handlerparameters.conditions.is the string not hello, world?.invalid]",
"parameters": {
"level": "info",
"log": "\n\nis the string not hello, world? if you see this, the answer's YES\n"
}
},
"does the objectA match objectB?": {
"blocking": true,
"handler": "../taskhandlers/logHandler",
"skipIf": "$[tasks.Test Condition Handlerparameters.conditions.does the objectA match objectB?.invalid]",
"parameters": {
"level": "info",
"log": "\n\ndoes the objectA match objectB? if you see this, the answer's YES\n"
}
},
"does the objectA not match objectB?": {
"blocking": true,
"handler": "../taskhandlers/logHandler",
"skipIf": "$[tasks.Test Condition Handlerparameters.conditions.does the objectA not match objectB?.invalid]",
"parameters": {
"level": "info",
"log": "\n\ndoes the objectA not match objectB? if you see this, the answer's YES\n"
}
},
"does the objectA match valueB?": {
"blocking": true,
"handler": "../taskhandlers/logHandler",
"skipIf": "$[tasks.Test Condition Handlerparameters.conditions.does the objectA match valueB?.invalid]",
"parameters": {
"level": "info",
"log": "\n\ndoes the objectA match valueB? if you see this, the answer's YES\n"
}
},
"is the non existing property null?": {
"blocking": true,
"handler": "../taskhandlers/logHandler",
"skipIf": "$[tasks.Test Condition Handlerparameters.conditions.is the non existing property null?.invalid]",
"parameters": {
"level": "info",
"log": "\n\nis the non existing property null? if you see this, the answer's YES\n"
}
}
}
}