Beispiel #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);
                }
            }
        }
Beispiel #2
0
        public static DecisionDefinitionDto fromDecisionDefinition(DecisionDefinition definition)
        {
            DecisionDefinitionDto dto = new DecisionDefinitionDto();

            dto.id           = definition.Id;
            dto.key          = definition.Key;
            dto.category     = definition.Category;
            dto.name         = definition.Name;
            dto.version      = definition.Version;
            dto.resource     = definition.ResourceName;
            dto.deploymentId = definition.DeploymentId;
            dto.decisionRequirementsDefinitionId  = definition.DecisionRequirementsDefinitionId;
            dto.decisionRequirementsDefinitionKey = definition.DecisionRequirementsDefinitionKey;
            dto.tenantId          = definition.TenantId;
            dto.historyTimeToLive = definition.HistoryTimeToLive;
            dto.versionTag        = definition.VersionTag;

            return(dto);
        }