I was looking for a more sophisticated workflow than Saga from AxonFramework -- which we are currently using -- and I found one in Netflix Conductor. Sadly, I have searched the Internet for a decent example but to no avail.
My question is, in Netflix Conductor, how might one define and create Task or WorkflowTask and most importantly, link a microservice to it? Here is a Netflix Conductor code from github:
WorkflowDef def = new WorkflowDef();
def.setName("test");
WorkflowTask t0 = new WorkflowTask();
t0.setName("t0");
t0.setType(Type.SIMPLE);
t0.setTaskReferenceName("t0");
WorkflowTask t1 = new WorkflowTask();
t1.setName("t1");
t1.setType(Type.SIMPLE);
t1.setTaskReferenceName("t1");
def.getTasks().add(t0);
def.getTasks().add(t1);
Pardon my confusion as I am new to Netflix Conductor.
In a microservices world, a lot of business process automations are driven by orchestrating across services. Conductor enables orchestration across services while providing control and visibility into their interactions.
Conductor is a free and open-source microservice orchestration software platform originally developed by Netflix.
Conductor is a platform created by Netflix to orchestrate workflows that span across microservices. Apache-2.0 license for commercial and non-commerical use. Freedom to deploy, modify and contribute back. A fully abstracted backend enables you choose your own database persistence layer and queueing service.
Conductor is a workflow server built upon Workflow Core that enables you to coordinate multiple services and scripts into workflows so that you can rapidly create complex workflow applications. Workflows are made up of a series of steps, with an internal data object shared between them to pass information around.
Assuming the Micro service has a REST Endpoint over HTTP. In that case you've to use HttpTask which is a system task. Httptask makes a Http call and the response is available as task output. Pls refer to the below link:HttpTask
Pls remember to set the SchemaVersion as 2 for the WorkflowDef which contains HttpTask. You would also need a corresponding Task type registered.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With