Beispiel #1
0
        public static DecisionRequirementsDefinitionDto fromDecisionRequirementsDefinition(DecisionRequirementsDefinition definition)
        {
            DecisionRequirementsDefinitionDto dto = new DecisionRequirementsDefinitionDto();

            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.tenantId     = definition.TenantId;

            return(dto);
        }
Beispiel #2
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);
                }
            }
        }