コード例 #1
0
        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);
        }
コード例 #2
0
 public virtual void applyTo(ModificationBuilder builder, ProcessEngine processEngine, ObjectMapper objectMapper)
 {
     foreach (ProcessInstanceModificationInstructionDto instruction in instructions)
     {
         instruction.applyTo(builder, processEngine, objectMapper);
     }
 }
コード例 #3
0
 public virtual IProcessInstantiationBuilder SetVariables(IDictionary <string, ITypedValue> variables)
 {
     if (variables != null)
     {
         ModificationBuilder.SetVariablesLocal(variables);
     }
     return(this);
 }
コード例 #4
0
//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);
        }
コード例 #5
0
 public virtual IProcessInstantiationBuilder SetVariableLocal(string name, object value)
 {
     ModificationBuilder.SetVariableLocal(name, value);
     return(this);
 }
コード例 #6
0
 public virtual IProcessInstantiationBuilder StartTransition(string transitionId)
 {
     ModificationBuilder.StartTransition(transitionId);
     return(this);
 }
コード例 #7
0
 public virtual IProcessInstantiationBuilder StartAfterActivity(string activityId)
 {
     ModificationBuilder.StartAfterActivity(activityId);
     return(this);
 }