示例#1
0
        private static void initDeployedResourceLists(DeploymentWithDefinitions deployment, DeploymentWithDefinitionsDto dto)
        {
            IList <ProcessDefinition> deployedProcessDefinitions = deployment.DeployedProcessDefinitions;

            if (deployedProcessDefinitions != null)
            {
                dto.deployedProcessDefinitions = new Dictionary <string, ProcessDefinitionDto>();
                foreach (ProcessDefinition processDefinition in deployedProcessDefinitions)
                {
                    dto.deployedProcessDefinitions[processDefinition.Id] = ProcessDefinitionDto.fromProcessDefinition(processDefinition);
                }
            }

            IList <CaseDefinition> deployedCaseDefinitions = deployment.DeployedCaseDefinitions;

            if (deployedCaseDefinitions != null)
            {
                dto.deployedCaseDefinitions = new Dictionary <string, CaseDefinitionDto>();
                foreach (CaseDefinition caseDefinition in deployedCaseDefinitions)
                {
                    dto.deployedCaseDefinitions[caseDefinition.Id] = CaseDefinitionDto.fromCaseDefinition(caseDefinition);
                }
            }

            IList <DecisionDefinition> deployedDecisionDefinitions = deployment.DeployedDecisionDefinitions;

            if (deployedDecisionDefinitions != null)
            {
                dto.deployedDecisionDefinitions = new Dictionary <string, DecisionDefinitionDto>();
                foreach (DecisionDefinition decisionDefinition in deployedDecisionDefinitions)
                {
                    dto.deployedDecisionDefinitions[decisionDefinition.Id] = DecisionDefinitionDto.fromDecisionDefinition(decisionDefinition);
                }
            }

            IList <DecisionRequirementsDefinition> deployedDecisionRequirementsDefinitions = deployment.DeployedDecisionRequirementsDefinitions;

            if (deployedDecisionRequirementsDefinitions != null)
            {
                dto.deployedDecisionRequirementsDefinitions = new Dictionary <string, DecisionRequirementsDefinitionDto>();
                foreach (DecisionRequirementsDefinition drd in deployedDecisionRequirementsDefinitions)
                {
                    dto.deployedDecisionRequirementsDefinitions[drd.Id] = DecisionRequirementsDefinitionDto.fromDecisionRequirementsDefinition(drd);
                }
            }
        }
示例#2
0
        public static ProcessDefinitionStatisticsResultDto fromProcessDefinitionStatistics(ProcessDefinitionStatistics statistics)
        {
            ProcessDefinitionStatisticsResultDto dto = new ProcessDefinitionStatisticsResultDto();

            dto.definition = ProcessDefinitionDto.fromProcessDefinition(statistics);
            dto.id         = statistics.Id;
            dto.instances  = statistics.Instances;
            dto.failedJobs = statistics.FailedJobs;

            dto.incidents = new List <IncidentStatisticsResultDto>();
            foreach (IncidentStatistics incident in statistics.IncidentStatistics)
            {
                IncidentStatisticsResultDto incidentDto = IncidentStatisticsResultDto.fromIncidentStatistics(incident);
                dto.incidents.Add(incidentDto);
            }

            return(dto);
        }
示例#3
0
        public static ProcessDefinitionDto fromProcessDefinition(ProcessDefinition definition)
        {
            ProcessDefinitionDto dto = new ProcessDefinitionDto();

            dto.id                    = definition.Id;
            dto.key                   = definition.Key;
            dto.category              = definition.Category;
            dto.description           = definition.Description;
            dto.name                  = definition.Name;
            dto.version               = definition.Version;
            dto.resource              = definition.ResourceName;
            dto.deploymentId          = definition.DeploymentId;
            dto.diagram               = definition.DiagramResourceName;
            dto.suspended             = definition.Suspended;
            dto.tenantId              = definition.TenantId;
            dto.versionTag            = definition.VersionTag;
            dto.historyTimeToLive     = definition.HistoryTimeToLive;
            dto.isStartableInTasklist = definition.StartableInTasklist;
            return(dto);
        }