ChildPolicy policy = childPolicy != null ? ChildPolicy.valueOf(childPolicy) : null;
dynamicWorkflowClientExternal.terminateWorkflowExecution(reason, details, policy);
}
public String[] startWorkflowExecution(String workflowId, String runId, String eventName, String version, Object arguments) {
DynamicWorkflowClientExternalImpl dynamicWorkflowClientExternal = (DynamicWorkflowClientExternalImpl) getDynamicWorkflowClient(workflowId, runId);
WorkflowType workflowType = new WorkflowType();
workflowType.setName(eventName);
workflowType.setVersion(version);
dynamicWorkflowClientExternal.setWorkflowType(workflowType);
dynamicWorkflowClientExternal.startWorkflowExecution(toArray(arguments));
String newWorkflowId = dynamicWorkflowClientExternal.getWorkflowExecution().getWorkflowId();
String newRunId = dynamicWorkflowClientExternal.getWorkflowExecution().getRunId();
return new String[] {newWorkflowId, newRunId};
}