Exemple #1
0
        protected internal virtual ActivityImpl findActivity(ProcessInstance pi, string activityId)
        {
            ProcessInstanceWithVariablesImpl entity           = (ProcessInstanceWithVariablesImpl)pi;
            ProcessDefinitionEntity          processDefEntity = entity.ExecutionEntity.ProcessDefinition;

            assertNotNull(processDefEntity);
            ActivityImpl activity = processDefEntity.findActivity(activityId);

            assertNotNull(activity);
            return(activity);
        }
Exemple #2
0
        protected internal virtual ProcessInstance instantiateProcess(CommandContext commandContext, CorrelationHandlerResult correlationResult)
        {
            ProcessDefinitionEntity processDefinitionEntity = correlationResult.ProcessDefinitionEntity;

            ActivityImpl    messageStartEvent = processDefinitionEntity.findActivity(correlationResult.StartEventActivityId);
            ExecutionEntity processInstance   = processDefinitionEntity.createProcessInstance(builder.BusinessKey, messageStartEvent);

            if (variablesEnabled)
            {
                variablesListener = new ExecutionVariableSnapshotObserver(processInstance, false, deserializeVariableValues);
            }

            processInstance.VariablesLocal = builder.PayloadProcessInstanceVariablesLocal;

            processInstance.start(builder.PayloadProcessInstanceVariables);

            return(processInstance);
        }