Beispiel #1
0
        private void CreateWorkflow(Guid candidateId, CandidateStatus status, bool ignoreTimeoutOnce)
        {
            // Create new workflow instance.

            var parameters = new Dictionary <string, object>
            {
                { "CandidateId", candidateId },
                { "State", status.ToState() },
                { "IgnoreTimeoutOnce", ignoreTimeoutOnce },
            };

            var workflow = CreateWorkflow <Design.CandidateStatusWorkflow.Workflow>(parameters);

            // Record workflow instance in LinkMe database.

            _candidatesWorkflowCommand.AddStatusWorkflow(candidateId, workflow.InstanceId);

            // Start running the workflow.

            workflow.Start();
        }
Beispiel #2
0
        void IService.OnStatusChanged(Guid candidateId, CandidateStatus status)
        {
            #region Log
            const string method = "OnStatusChanged";
            EventSource.Raise(Event.FlowEnter, method, Event.Arg("candidateId", candidateId), Event.Arg("status", status));
            #endregion

            HandleExternalEvent(candidateId, status, i => _dataExchange.OnStatusChanged(i, status.ToState()), method);

            #region Log
            EventSource.Raise(Event.FlowExit, method, Event.Arg("candidateId", candidateId), Event.Arg("status", status));
            #endregion
        }