private ModificationBuilder createModificationBuilder(ModificationDto dto) { ModificationBuilder builder = ProcessEngine.RuntimeService.createModification(dto.ProcessDefinitionId); if (dto.Instructions != null && dto.Instructions.Count > 0) { dto.applyTo(builder, ProcessEngine, objectMapper); } IList <string> processInstanceIds = dto.ProcessInstanceIds; builder.processInstanceIds(processInstanceIds); ProcessInstanceQueryDto processInstanceQueryDto = dto.ProcessInstanceQuery; if (processInstanceQueryDto != null) { ProcessInstanceQuery processInstanceQuery = processInstanceQueryDto.toQuery(ProcessEngine); builder.processInstanceQuery(processInstanceQuery); } if (dto.SkipCustomListeners) { builder.skipCustomListeners(); } if (dto.SkipIoMappings) { builder.skipIoMappings(); } return(builder); }
public virtual void applyTo(ModificationBuilder builder, ProcessEngine processEngine, ObjectMapper objectMapper) { foreach (ProcessInstanceModificationInstructionDto instruction in instructions) { instruction.applyTo(builder, processEngine, objectMapper); } }
public virtual IProcessInstantiationBuilder SetVariables(IDictionary <string, ITypedValue> variables) { if (variables != null) { ModificationBuilder.SetVariablesLocal(variables); } return(this); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Before public void setUpRuntimeData() public virtual void setUpRuntimeData() { runtimeServiceMock = mock(typeof(RuntimeService)); when(processEngine.RuntimeService).thenReturn(runtimeServiceMock); modificationBuilderMock = mock(typeof(ModificationBuilder)); when(modificationBuilderMock.cancelAllForActivity(anyString())).thenReturn(modificationBuilderMock); when(modificationBuilderMock.startAfterActivity(anyString())).thenReturn(modificationBuilderMock); when(modificationBuilderMock.startBeforeActivity(anyString())).thenReturn(modificationBuilderMock); when(modificationBuilderMock.startTransition(anyString())).thenReturn(modificationBuilderMock); when(modificationBuilderMock.processInstanceIds(anyListOf(typeof(string)))).thenReturn(modificationBuilderMock); Batch batchMock = createMockBatch(); when(modificationBuilderMock.executeAsync()).thenReturn(batchMock); when(runtimeServiceMock.createModification(anyString())).thenReturn(modificationBuilderMock); }
public virtual IProcessInstantiationBuilder SetVariableLocal(string name, object value) { ModificationBuilder.SetVariableLocal(name, value); return(this); }
public virtual IProcessInstantiationBuilder StartTransition(string transitionId) { ModificationBuilder.StartTransition(transitionId); return(this); }
public virtual IProcessInstantiationBuilder StartAfterActivity(string activityId) { ModificationBuilder.StartAfterActivity(activityId); return(this); }