Beispiel #1
0
        public StateMachineDefinition GetStateMachineDefinition(string WFName)
        {
            TrackingWorkFlowInteraction II = new TrackingWorkFlowInteraction();
            StateMachineDefinition      statemachineDefinition = II.getStateMachineDefinition(WFName);

            return(statemachineDefinition);
        }
Beispiel #2
0
        public WorkFlowInstance startWorkFlow(CommandInfo CommandInfo)
        {
            WorkFlowInstance wfi = new WorkFlowInstance();

            try
            {
                string WFName = CommandInfo.WFName.Trim();
                TrackingWorkFlowInteraction twfi = new TrackingWorkFlowInteraction();
                string id = twfi.startProcess(WFName);

                CommandInteraction          cmdInteraction = new CommandInteraction();
                Dictionary <string, string> paras          = new Dictionary <string, string>();
                paras.Add("InstanceId", id);
                paras.Add("WFName", CommandInfo.WFName);
                if (CommandInfo.ParameterList != null)
                {
                    foreach (Parameter p in CommandInfo.ParameterList)
                    {
                        paras.Add(p.Name, p.Value);
                    }
                }
                TrackingWorkFlowInteraction II = new TrackingWorkFlowInteraction();
                StateMachineDefinition      statemachineDefinition = II.getStateMachineDefinition(CommandInfo.WFName);
                paras.Add("QFEStatus", statemachineDefinition.InitialState);
                cmdInteraction.executeCommand(CommandInfo.CommandName, paras);


                wfi.Id = id;
                List <string>        candCmds = twfi.getCandidateCommands(WFName, id);
                CandidateCommandList ccl      = new CandidateCommandList();
                ccl.AddRange(candCmds);
                wfi.CandidateCommandList = ccl;
            }
            catch (Exception e)
            {
                throw new WebFaultException <string>(e.ToString(), HttpStatusCode.InternalServerError);
//                TrackingLog.Log(e.Message + "!!" + e.ToString());
            }
            return(wfi);
        }
Beispiel #3
0
 static void testgetStateMachineDefinition()
 {
     TrackingWorkFlowInteraction II = new TrackingWorkFlowInteraction();
     StateMachineDefinition      statemachineDefinition = II.getStateMachineDefinition("SESampleProcess2WorkFlow");
 }