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 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 async Task InitializeAsync() { TestRealmId = $"{RealmIdPrefix}-{RandomId()}"; RealmIds.Add(TestRealmId); TestRealm = await _createRealmSample.CreateRealmAsync(ProjectId, RegionId, TestRealmId); TestDeploymentId = $"{DeploymentIdPrefix}-{RandomId()}"; DeploymentIds.Add(TestDeploymentId); TestDeployment = await _createDeploymentSample.CreateDeploymentAsync(ProjectId, TestDeploymentId); TestClusterId = $"{ClusterIdPrefix}-{RandomId()}"; ClusterIdentifiers.Add(new ClusterIdentifier(TestRealmId, TestClusterId)); TestCluster = await _createClusterSample.CreateClusterAsync(ProjectId, RegionId, TestRealmId, TestClusterId, GkeClusterName); TestConfigId = $"{ConfigIdPrefix}-{RandomId()}"; ConfigIdentifiers.Add(new ConfigIdentifier(TestDeploymentId, TestConfigId)); TestConfig = await _createConfigSample.CreateConfigAsync(ProjectId, RegionId, TestDeploymentId, TestConfigId); }