Example #1
0
        public async Task Start <TData, TStep>(TData data, Action <object> onCompletedWorkflow)
            where TStep : Step
            where TData : new()
        {
            var workflow = _workflowManager.CreateWorkflow(data);
            var step     = GetNextStep <TStep>();
            var result   = await workflow.Run <IWorkflow, TStep>(step);

            var wf = (IWorkflow <object>)result;

            onCompletedWorkflow.Invoke(wf.WorkflowData);
        }