You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Current java-sdk implementation of Switch class constructor Switch(WorkflowTask) is incomplete, hence breaking WorkflowDef-to-ConductorWorkflow conversion.
The shortcoming can be corrected by adding the following statements to constructor Switch(WorkflowTask): this.useJavascript = workflowTask.getEvaluatorType().equals(JAVASCRIPT_NAME); this.caseExpression = (String)this.getInput().get("switchCaseValue");
To Reproduce
The WorkflowDef-to-ConductorWorkflow conversion fault is reproduced by modifying example app java-sdk-examples to function as test program.
Statements were added to Main.java starting at Line 54 for ConductorWorkflow -> WorkflowDef -> ConductorWorkflow conversion.
Expected behavior
If class-constructor Switch(WorkflowTask) is functioning correctly, the resultant workflow which has undergone ConductorWorkflow->WorkflowDef->ConductorWorkflow conversion should behave exactly as the original workflow.
The text was updated successfully, but these errors were encountered:
Describe the bug
Current java-sdk implementation of Switch class constructor Switch(WorkflowTask) is incomplete, hence breaking WorkflowDef-to-ConductorWorkflow conversion.
The shortcoming can be corrected by adding the following statements to constructor Switch(WorkflowTask):
this.useJavascript = workflowTask.getEvaluatorType().equals(JAVASCRIPT_NAME);
this.caseExpression = (String)this.getInput().get("switchCaseValue");
Details
Conductor version: 3.17.0
Persistence implementation: Cassandra, Postgres
Queue implementation: Postgres
Lock: Redis
Workflow definition:
Task definition: Switch
Event handler definition:
To Reproduce
The WorkflowDef-to-ConductorWorkflow conversion fault is reproduced by modifying example app java-sdk-examples to function as test program.
Statements were added to Main.java starting at Line 54 for ConductorWorkflow -> WorkflowDef -> ConductorWorkflow conversion.
//ConductorWorkflow -> WorkflowDef conversion
WorkflowDef workflowDef = simpleWorkflow.toWorkflowDef();
//WorkflowDef -> ConductorWorkflow conversion
simpleWorkflow = ConductorWorkflow.fromWorkflowDef(workflowDef);
//executeDynamic
workflowExecution = utils.getWorkflowExecutor().executeWorkflow(simpleWorkflow, input);
workflowRun = workflowExecution.get(10, TimeUnit.SECONDS);
Expected behavior
If class-constructor Switch(WorkflowTask) is functioning correctly, the resultant workflow which has undergone ConductorWorkflow->WorkflowDef->ConductorWorkflow conversion should behave exactly as the original workflow.
The text was updated successfully, but these errors were encountered: