Пример #1
0
        public ProcessParseHandler()
        {
            this.handlers.Add("dataObject", new DataObjectParseHandler());
            this.handlers.Add("dataObjectReference", new DataObjectReferenceParseHandler());

            this.handlers.Add("property", new PropertyParseHandler <Process>((proc, props) =>
            {
                proc.Properties.Add(props);
            }));

            //resource
            IParseHandler handler = new ResourceRoleParseHandler();

            foreach (var item in ResourceRoleParseHandler.Keys)
            {
                this.handlers.Add(item, handler);
            }

            this.handlers.Add("startEvent", new StartEventParseHandler());
            this.handlers.Add("userTask", new UserTaskParseHandler());
            this.handlers.Add("sequenceFlow", new SequenceFlowParseHandler());
            this.handlers.Add("endEvent", new EndEventParseHandler());
            this.handlers.Add("parallelGateway", new ParallelGatewayParseHandler());
            this.handlers.Add("exclusiveGateway", new ExclusiveGatewayParseHandler());
            this.handlers.Add("inclusiveGateway", new InclusiveGatewayParseHandler());
            this.handlers.Add("complexGateway", new ComplexGatewayParseHandler());
            this.handlers.Add("scriptTask", new ScriptTaskParseHandler());
            this.handlers.Add("serviceTask", new ServiceTaskParseHandler());
            this.handlers.Add("receiveTask", new ReceiveTaskParseHandler());
            this.handlers.Add("sendTask", new SendTaskParseHandler());
            this.handlers.Add("task", new TaskParseHandler());
            this.handlers.Add("manualTask", new ManualTaskParseHandler());
            this.handlers.Add("businessRuleTask", new BusinessRuleTaskParseHandler());
            this.handlers.Add("callActivity", new CallActivityParseHandler());

            this.handlers.Add("subProcess", new SubProcessParseHandler());
            this.handlers.Add("transaction", new TransactionParseHandler());
            this.handlers.Add("adHocSubProcess", new AdHocSubProcessParseHandler());

            var artifactHandler = new ArtifactParseHandler();

            this.handlers.Add("textAnnotation", artifactHandler);
            this.handlers.Add("association", artifactHandler);
        }
Пример #2
0
        public SubProcessParseHandler()
        {
            this.handlers.Add("dataObject", new DataObjectParseHandler());
            this.handlers.Add("dataObjectReference", new DataObjectReferenceParseHandler());

            this.handlers.Add("startEvent", new StartEventParseHandler());
            this.handlers.Add("userTask", new UserTaskParseHandler());
            this.handlers.Add("sequenceFlow", new SequenceFlowParseHandler());
            this.handlers.Add("endEvent", new EndEventParseHandler());
            this.handlers.Add("parallelGateway", new ParallelGatewayParseHandler());
            this.handlers.Add("exclusiveGateway", new ExclusiveGatewayParseHandler());
            this.handlers.Add("inclusiveGateway", new InclusiveGatewayParseHandler());
            this.handlers.Add("complexGateway", new ComplexGatewayParseHandler());
            this.handlers.Add("scriptTask", new ScriptTaskParseHandler());
            this.handlers.Add("serviceTask", new ServiceTaskParseHandler());
            this.handlers.Add("receiveTask", new ReceiveTaskParseHandler());
            this.handlers.Add("sendTask", new SendTaskParseHandler());
            this.handlers.Add("task", new TaskParseHandler());
            this.handlers.Add("manualTask", new ManualTaskParseHandler());
            this.handlers.Add("businessRuleTask", new BusinessRuleTaskParseHandler());
            this.handlers.Add("callActivity", new CallActivityParseHandler());

            this.handlers.Add("subProcess", new BpmnHandlerCallback((p, c, x) =>
            {
                return(_SubProcessHandler.Create(p, c, x));
            }));

            this.handlers.Add("transaction", new BpmnHandlerCallback((p, c, x) =>
            {
                return(_TransactionHandler.Create(p, c, x));
            }));

            this.handlers.Add("adHocSubProcess", new BpmnHandlerCallback((p, c, x) =>
            {
                return(_AdHocSubProcessHandler.Create(p, c, x));
            }));

            var artifactHandler = new ArtifactParseHandler();

            this.handlers.Add("textAnnotation", artifactHandler);
            this.handlers.Add("association", artifactHandler);
        }