Esempio n. 1
0
        protected internal override void startInstance(ActivityExecution execution, VariableMap variables, string businessKey)
        {
            ProcessDefinitionImpl definition      = getProcessDefinitionToCall(execution, CallableElement);
            PvmProcessInstance    processInstance = execution.createSubProcessInstance(definition, businessKey);

            processInstance.start(variables);
        }
Esempio n. 2
0
        public static ProcessDefinitionImpl getProcessDefinitionToCall(VariableScope execution, BaseCallableElement callableElement)
        {
            string processDefinitionKey = callableElement.getDefinitionKey(execution);
            string tenantId             = callableElement.getDefinitionTenantId(execution);

            DeploymentCache deploymentCache = DeploymentCache;

            ProcessDefinitionImpl processDefinition = null;

            if (callableElement.LatestBinding)
            {
                processDefinition = deploymentCache.findDeployedLatestProcessDefinitionByKeyAndTenantId(processDefinitionKey, tenantId);
            }
            else if (callableElement.DeploymentBinding)
            {
                string deploymentId = callableElement.DeploymentId;
                processDefinition = deploymentCache.findDeployedProcessDefinitionByDeploymentAndKey(deploymentId, processDefinitionKey);
            }
            else if (callableElement.VersionBinding)
            {
                int?version = callableElement.getVersion(execution);
                processDefinition = deploymentCache.findDeployedProcessDefinitionByKeyVersionAndTenantId(processDefinitionKey, version, tenantId);
            }
            else if (callableElement.VersionTagBinding)
            {
                string versionTag = callableElement.getVersionTag(execution);
                processDefinition = deploymentCache.findDeployedProcessDefinitionByKeyVersionTagAndTenantId(processDefinitionKey, versionTag, tenantId);
            }

            return(processDefinition);
        }
Esempio n. 3
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Deployment public void testAlterActivityBehaviors() throws Exception
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
        public virtual void testAlterActivityBehaviors()
        {
            ProcessInstance       processInstance   = runtimeService.startProcessInstanceByKey("oneTaskWithIntermediateThrowEvent-modified");
            ProcessDefinitionImpl processDefinition = ((ProcessInstanceWithVariablesImpl)processInstance).ExecutionEntity.ProcessDefinition;

            ActivityImpl cancelThrowEvent = processDefinition.findActivity("CancelthrowEvent");

            assertTrue(cancelThrowEvent.ActivityBehavior is TestBPMNParseListener.TestCompensationEventActivityBehavior);

            ActivityImpl startEvent = processDefinition.findActivity("theStart");

            assertTrue(startEvent.ActivityBehavior is TestBPMNParseListener.TestNoneStartEventActivityBehavior);

            ActivityImpl endEvent = processDefinition.findActivity("theEnd");

            assertTrue(endEvent.ActivityBehavior is TestBPMNParseListener.TestNoneEndEventActivityBehavior);
        }
Esempio n. 4
0
        protected internal override long?getProcessDefinitionPriority <T1>(ExecutionEntity execution, JobDeclaration <T1> jobDeclaration)
        {
            ProcessDefinitionImpl processDefinition = jobDeclaration.ProcessDefinition;

            return(getProcessDefinedPriority(processDefinition, BpmnParse.PROPERTYNAME_JOB_PRIORITY, execution, describeContext(jobDeclaration, execution)));
        }