public async Task <IActionResult> StartWorkflow([FromBody] WorkflowStartData startData) { this._host.RegisterWorkflow <Test1>(); var result = new WorkflowValue(); //result.WorkflowId = this._host.StartWorkflow(startData.WorkflowId, startData.Version).Result; result.WorkflowId = MystartWorkflow(startData.WorkflowId, startData.Version).Result; result.WorkflowDefinationId = PersistWorkflowDefinetion(startData.WorkflowId, startData.Version); await StartStep(result.WorkflowId, startData); return(new JsonResult(result)); }
private async Task StartStep(string id, WorkflowStartData data) { await this._queueProvider.QueueWork(id, QueueType.Workflow); await this._queueProvider.QueueWork(id, QueueType.Index); await this._eventHub.PublishNotification(new WorkflowStarted() { EventTimeUtc = DateTime.UtcNow, Reference = data.Reference, WorkflowInstanceId = id, WorkflowDefinitionId = data.WorkflowId, Version = data.Version ?? 1 }); }