public virtual void TestDeployAndGetProcessDefinition() { // given process model //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final': //ORIGINAL LINE: final org.Camunda.bpm.Model.bpmn.IBpmnModelInstance modelInstance = org.Camunda.bpm.Model.bpmn.Bpmn.CreateExecutableProcess("foo").StartEvent().UserTask().EndEvent().Done(); IBpmnModelInstance modelInstance = ESS.FW.Bpm.Model.Bpmn.Bpmn.CreateExecutableProcess("foo").StartEvent().UserTask().EndEvent().Done(); // when process model is deployed IDeploymentWithDefinitions deployment = repositoryService.CreateDeployment().AddModelInstance("foo.bpmn", modelInstance).DeployAndReturnDefinitions(); DeploymentIds.Add(deployment.Id); // then deployment contains deployed process definitions IList <IProcessDefinition> deployedProcessDefinitions = deployment.DeployedProcessDefinitions; Assert.AreEqual(1, deployedProcessDefinitions.Count); Assert.IsNull(deployment.DeployedCaseDefinitions); Assert.IsNull(deployment.DeployedDecisionDefinitions); Assert.IsNull(deployment.DeployedDecisionRequirementsDefinitions); // and persisted process definition is equal to deployed process definition IProcessDefinition persistedProcDef = repositoryService.CreateProcessDefinitionQuery(c => c.ResourceName == "foo.bpmn").First(); Assert.AreEqual(persistedProcDef.Id, deployedProcessDefinitions[0].Id); }
public virtual IDeploymentWithDefinitions Deploy(IDeploymentBuilder deploymentBuilder) { IDeploymentWithDefinitions deployment = deploymentBuilder.DeployWithResult(); engineRule.ManageDeployment(deployment); return(deployment); }
public virtual void TestDeployNonExecutableProcess() { // given non executable process definition //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final': //ORIGINAL LINE: final org.Camunda.bpm.Model.bpmn.IBpmnModelInstance modelInstance = org.Camunda.bpm.Model.bpmn.Bpmn.CreateProcess("foo").StartEvent().UserTask().EndEvent().Done(); IBpmnModelInstance modelInstance = ESS.FW.Bpm.Model.Bpmn.Bpmn.CreateProcess("foo").StartEvent().UserTask().EndEvent().Done(); // when process model is deployed IDeploymentWithDefinitions deployment = repositoryService.CreateDeployment().AddModelInstance("foo.bpmn", modelInstance).DeployAndReturnDefinitions(); DeploymentIds.Add(deployment.Id); // then deployment contains no deployed process definition Assert.IsNull(deployment.DeployedProcessDefinitions); // and there exist no persisted process definitions Assert.IsNull(repositoryService.CreateProcessDefinitionQuery(c => c.ResourceName == "foo.bpmn").First()); }
public ProcessApplicationDeploymentImpl(IDeploymentWithDefinitions deployment, IProcessApplicationRegistration registration) { this.Deployment = deployment; this.Registration = registration; }