@ Service public String startWorkflow ( String name , Integer version , String correlationId , Map < String , Object > input ) { WorkflowDef workflowDef = metadataService . getWorkflowDef ( name , version ) ; if ( workflowDef == null ) { throw new ApplicationException ( ApplicationException . Code . NOT_FOUND , String . format ( "No such workflow found by name: %s, version: %d" , name , version ) ) ; } return workflowExecutor . startWorkflow ( workflowDef . getName ( ) , workflowDef . getVersion ( ) , correlationId , input , null ) ; }
Start a new workflow . Returns the ID of the workflow instance that can be later used for tracking .