Michiel Rop pushed to branch feature/REPO-1835 at cms-community / hippo-repository
Commits: eab949fd by Michiel Rop at 2017-09-28T11:49:33+02:00 REPO-1835 Swap parameters for transition method The initialPayload has preference. - - - - - 2 changed files: - builtin/src/main/java/org/onehippo/repository/documentworkflow/DocumentWorkflow.java - workflow/src/main/java/org/onehippo/repository/documentworkflow/DocumentWorkflowImpl.java Changes: ===================================== builtin/src/main/java/org/onehippo/repository/documentworkflow/DocumentWorkflow.java ===================================== --- a/builtin/src/main/java/org/onehippo/repository/documentworkflow/DocumentWorkflow.java +++ b/builtin/src/main/java/org/onehippo/repository/documentworkflow/DocumentWorkflow.java @@ -537,12 +537,12 @@ public interface DocumentWorkflow extends Workflow, EditableWorkflow, CopyWorkfl * Triggers the action with supplied payload. * * @param action - * @param transitionPayload + * @param initialPayload * @return * @throws WorkflowException * @throws RepositoryException */ - Object transition(String action, Map<String, Object> transitionPayload) throws WorkflowException; + Object transition(String action, Map<String, Object> initialPayload) throws WorkflowException; /** * Triggers the action with supplied transaction payload and initial payload @@ -552,7 +552,7 @@ public interface DocumentWorkflow extends Workflow, EditableWorkflow, CopyWorkfl * @return * @throws WorkflowException */ - Object transition(String action, Map<String, Object> transitionPayload, Map<String, Object> initialPayload) throws WorkflowException; + Object transition(String action, Map<String, Object> initialPayload, Map<String, Object> transitionPayload) throws WorkflowException; /** * Triggers the action ===================================== workflow/src/main/java/org/onehippo/repository/documentworkflow/DocumentWorkflowImpl.java ===================================== --- a/workflow/src/main/java/org/onehippo/repository/documentworkflow/DocumentWorkflowImpl.java +++ b/workflow/src/main/java/org/onehippo/repository/documentworkflow/DocumentWorkflowImpl.java @@ -378,13 +378,13 @@ public class DocumentWorkflowImpl extends WorkflowImpl implements DocumentWorkfl @Override - public Object transition(String action, Map<String, Object> transitionPayload) throws WorkflowException{ - return transition(action,transitionPayload,Collections.emptyMap()); + public Object transition(String action, Map<String, Object> initialPayload) throws WorkflowException{ + return transition(action,initialPayload,Collections.emptyMap()); } @Override - public Object transition(String action, Map<String, Object> transitionPayload, Map<String, Object> initialPayload) throws WorkflowException{ + public Object transition(String action, Map<String, Object> initialPayload, Map<String, Object> transitionPayload) throws WorkflowException{ workflowExecutor.start(initialPayload); return workflowExecutor.triggerAction(action,transitionPayload); } View it on GitLab: https://code.onehippo.org/cms-community/hippo-repository/commit/eab949fd647449f6586ef891155459c348feb5d4 --- View it on GitLab: https://code.onehippo.org/cms-community/hippo-repository/commit/eab949fd647449f6586ef891155459c348feb5d4 You're receiving this email because of your account on code.onehippo.org.
_______________________________________________ Hippocms-svn mailing list Hippocms-svn@lists.onehippo.org https://lists.onehippo.org/mailman/listinfo/hippocms-svn