/** * Create an instance of {@link Decision } * */ public Decision createDecision() { return new Decision(); }
public Decision substituteProperties(final Decision decision, final Properties submittedProps, final Properties parentProps) { // resolve all the properties used in attributes and update the JAXB // model decision.setId(this.replaceAllProperties(decision.getId(), submittedProps, parentProps)); decision.setRef(this.replaceAllProperties(decision.getRef(), submittedProps, parentProps)); // Resolve all the properties defined for this decision Properties currentProps = parentProps; if (decision.getProperties() != null) { currentProps = this.resolveElementProperties(decision.getProperties().getPropertyList(), submittedProps, parentProps); } if (decision.getTransitionElements() != null) { for (final TransitionElement transitionElement : decision.getTransitionElements()) { PropertyResolverFactory.createTransitionElementPropertyResolver(this.isPartitionedStep).substituteProperties(transitionElement, submittedProps, currentProps); } } return decision; }
@Override public ExecutionStatus execute() { String deciderId = decision.getRef(); List<Property> propList = (decision.getProperties() == null) ? null : decision.getProperties().getPropertyList(); DeciderProxy deciderProxy; //Create a decider proxy and inject the associated properties /* Set the contexts associated with this scope */ //job context is always in scope //the parent controller will only pass one valid context to a decision controller //so two of these contexts will always be null InjectionReferences injectionRef = new InjectionReferences(jobExecution.getJobContext(), null, propList); try { deciderProxy = ProxyFactory.createDeciderProxy(deciderId,injectionRef ); } catch (ArtifactValidationException e) { throw new BatchContainerServiceException("Cannot create the decider [" + deciderId + "]", e); } String exitStatus = deciderProxy.decide(this.previousStepExecutions); logger.fine("Decider exiting and setting job-level exit status to " + exitStatus); //Set the value returned from the decider as the job context exit status. this.jobExecution.getJobContext().setExitStatus(exitStatus); return new ExecutionStatus(ExtendedBatchStatus.NORMAL_COMPLETION, exitStatus); }
public Decision substituteProperties(final Decision decision, final Properties submittedProps, final Properties parentProps) { // resolve all the properties used in attributes and update the JAXB // model decision.setId(this.replaceAllProperties(decision.getId(), submittedProps, parentProps)); decision.setRef(this.replaceAllProperties(decision.getRef(), submittedProps, parentProps)); // Resolve all the properties defined for this decision Properties currentProps = parentProps; if (decision.getProperties() != null) { currentProps = this.resolveElementProperties(decision.getProperties().getPropertyList(), submittedProps, parentProps); } if (decision.getTransitionElements() != null) { for (final TransitionElement transitionElement : decision.getTransitionElements()) { PropertyResolverFactory.createTransitionElementPropertyResolver(this.isPartitionedStep).substituteProperties(transitionElement, submittedProps, currentProps); } } return decision; }
@Override public ExecutionStatus execute() { String deciderId = decision.getRef(); List<Property> propList = (decision.getProperties() == null) ? null : decision.getProperties().getPropertyList(); DeciderProxy deciderProxy; //Create a decider proxy and inject the associated properties /* Set the contexts associated with this scope */ //job context is always in scope //the parent controller will only pass one valid context to a decision controller //so two of these contexts will always be null InjectionReferences injectionRef = new InjectionReferences(jobExecution.getJobContext(), null, propList); try { deciderProxy = ProxyFactory.createDeciderProxy(deciderId,injectionRef ); } catch (ArtifactValidationException e) { throw new BatchContainerServiceException("Cannot create the decider [" + deciderId + "]", e); } String exitStatus = deciderProxy.decide(this.previousStepExecutions); logger.fine("Decider exiting and setting job-level exit status to " + exitStatus); //Set the value returned from the decider as the job context exit status. this.jobExecution.getJobContext().setExitStatus(exitStatus); return new ExecutionStatus(ExtendedBatchStatus.NORMAL_COMPLETION, exitStatus); }
public Decision substituteProperties(final Decision decision, final Properties submittedProps, final Properties parentProps) { // resolve all the properties used in attributes and update the JAXB // model decision.setId(this.replaceAllProperties(decision.getId(), submittedProps, parentProps)); decision.setRef(this.replaceAllProperties(decision.getRef(), submittedProps, parentProps)); // Resolve all the properties defined for this decision Properties currentProps = parentProps; if (decision.getProperties() != null) { currentProps = this.resolveElementProperties(decision.getProperties().getPropertyList(), submittedProps, parentProps); } if (decision.getTransitionElements() != null) { for (final TransitionElement transitionElement : decision.getTransitionElements()) { PropertyResolverFactory.createTransitionElementPropertyResolver(this.isPartitionedStep).substituteProperties(transitionElement, submittedProps, currentProps); } } return decision; }
@Override public ExecutionStatus execute() { String deciderId = decision.getRef(); List<Property> propList = (decision.getProperties() == null) ? null : decision.getProperties().getPropertyList(); this.jobExecution, execution, decision.getRef(), getPersistenceManagerService().getPersistenceType(), getPersistenceManagerService().getDisplayId(),
/** * Create an instance of {@link Decision } * */ public Decision createDecision() { return new Decision(); }
/** * Create an instance of {@link Decision } * */ public Decision createDecision() { return new Decision(); }