Пример #1
0
        public virtual Stream Execute(CommandContext commandContext)
        {
            var decisionDefinition =
                new GetDeploymentDecisionDefinitionCmd(DecisionDefinitionId).Execute(commandContext);

            var deploymentId = decisionDefinition.DeploymentId;
            var resourceName = decisionDefinition.ResourceName;

            return
                (commandContext.RunWithoutAuthorization(() => new GetDeploymentResourceCmd(deploymentId, resourceName).Execute(commandContext)));
        }
        public virtual Stream Execute(CommandContext commandContext)
        {
            var decisionDefinition =
                new GetDeploymentDecisionDefinitionCmd(DecisionDefinitionId).Execute(commandContext);

            var deploymentId = decisionDefinition.DeploymentId;
            var resourceName = decisionDefinition.DiagramResourceName;

            if (!ReferenceEquals(resourceName, null))
            {
                return
                    (commandContext.RunWithoutAuthorization(() => new GetDeploymentResourceCmd(deploymentId, resourceName).Execute(commandContext)));
            }
            return(null);
        }