protected internal override IList <DecisionDefinitionEntity> TransformDefinitions(DeploymentEntity deployment, ResourceEntity resource, Bpm.Engine.Impl.Core.Model.Properties properties)
        {
            IList <DecisionDefinitionEntity> decisions = new List <DecisionDefinitionEntity>();

            // get the decisions from the deployed drd instead of parse the DMN again
            DecisionRequirementsDefinitionEntity deployedDrd = FindDeployedDrdForResource(deployment, resource.Name);

            if (deployedDrd == null)
            {
                throw Log.ExceptionNoDrdForResource(resource.Name);
            }

            ICollection <IDmnDecision> decisionsOfDrd = deployedDrd.Decisions;

            foreach (IDmnDecision decisionOfDrd in decisionsOfDrd)
            {
                DecisionDefinitionEntity decisionEntity = (DecisionDefinitionEntity)decisionOfDrd;
                if (DecisionRequirementsDefinitionDeployer.IsDecisionRequirementsDefinitionPersistable(deployedDrd))
                {
                    decisionEntity.DecisionRequirementsDefinitionId  = deployedDrd.Id;
                    decisionEntity.DecisionRequirementsDefinitionKey = deployedDrd.Key;
                }

                decisions.Add(decisionEntity);
            }

            if (!DecisionRequirementsDefinitionDeployer.IsDecisionRequirementsDefinitionPersistable(deployedDrd))
            {
                deployment.RemoveArtifact(deployedDrd);
            }

            return(decisions);
        }
Esempio n. 2
0
                public ProcessApplicationReference execute(CommandContext commandContext)
                {
                    ProcessEngineConfigurationImpl configuration = commandContext.ProcessEngineConfiguration;
                    DeploymentCache deploymentCache = configuration.DeploymentCache;
                    DecisionRequirementsDefinitionEntity definition = deploymentCache.findDeployedDecisionRequirementsDefinitionById(definitionId);

                    return(ProcessApplicationContextUtil.getTargetProcessApplication(definition));
                }
Esempio n. 3
0
        public virtual DecisionRequirementsDefinition execute(CommandContext commandContext)
        {
            ensureNotNull("decisionRequirementsDefinitionId", decisionRequirementsDefinitionId);
            DeploymentCache deploymentCache = Context.ProcessEngineConfiguration.DeploymentCache;
            DecisionRequirementsDefinitionEntity decisionRequirementsDefinition = deploymentCache.findDeployedDecisionRequirementsDefinitionById(decisionRequirementsDefinitionId);

            foreach (CommandChecker checker in commandContext.ProcessEngineConfiguration.CommandCheckers)
            {
                checker.checkReadDecisionRequirementsDefinition(decisionRequirementsDefinition);
            }

            return(decisionRequirementsDefinition);
        }
Esempio n. 4
0
 public virtual DecisionRequirementsDefinitionEntity resolveDecisionRequirementsDefinition(DecisionRequirementsDefinitionEntity decisionRequirementsDefinition)
 {
     return(decisionRequirementsDefinitionCache.resolveDefinition(decisionRequirementsDefinition));
 }
Esempio n. 5
0
        //DECISION REQUIREMENT DEFINITION ////////////////////////////////////////////////////////////////////////////

        public virtual void addDecisionRequirementsDefinition(DecisionRequirementsDefinitionEntity decisionRequirementsDefinition)
        {
            decisionRequirementsDefinitionCache.addDefinition(decisionRequirementsDefinition);
        }