Index: engine/src/main/java/org/hippoecm/repository/impl/WorkflowPostActionSimpleQuery.java =================================================================== --- engine/src/main/java/org/hippoecm/repository/impl/WorkflowPostActionSimpleQuery.java (revision 32939) +++ engine/src/main/java/org/hippoecm/repository/impl/WorkflowPostActionSimpleQuery.java (working copy) @@ -36,6 +36,7 @@ import org.hippoecm.repository.api.Workflow; import org.hippoecm.repository.api.WorkflowException; import org.hippoecm.repository.standardworkflow.WorkflowEventWorkflow; +import org.hippoecm.repository.standardworkflow.WorkflowEventsWorkflow; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -142,6 +143,10 @@ Workflow workflow = workflowManager.getWorkflowInternal(wfNode, wfSubject); if (workflow instanceof WorkflowEventWorkflow) { WorkflowEventWorkflow event = (WorkflowEventWorkflow)workflow; + if (event instanceof WorkflowEventsWorkflow) { + ((WorkflowEventsWorkflow)event).setWorkflowCategory(workflowCategory); + ((WorkflowEventsWorkflow)event).setWorkflowMethod(workflowMethod); + } try { if (postconditionSet != null) { final Iterator postconditionSetIterator = postconditionSet.iterator(); Index: engine/src/main/java/org/hippoecm/repository/impl/WorkflowPostActionsBoundMethod.java =================================================================== --- engine/src/main/java/org/hippoecm/repository/impl/WorkflowPostActionsBoundMethod.java (revision 32939) +++ engine/src/main/java/org/hippoecm/repository/impl/WorkflowPostActionsBoundMethod.java (working copy) @@ -26,6 +26,7 @@ import org.hippoecm.repository.api.Workflow; import org.hippoecm.repository.api.WorkflowException; import org.hippoecm.repository.standardworkflow.WorkflowEventWorkflow; +import org.hippoecm.repository.standardworkflow.WorkflowEventsWorkflow; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -75,6 +76,10 @@ Workflow workflow = workflowManager.getWorkflowInternal(wfNode, wfSubject); if (workflow instanceof WorkflowEventWorkflow) { WorkflowEventWorkflow event = (WorkflowEventWorkflow)workflow; + if (event instanceof WorkflowEventsWorkflow) { + ((WorkflowEventsWorkflow)event).setWorkflowCategory(workflowCategory); + ((WorkflowEventsWorkflow)event).setWorkflowMethod(workflowMethod); + } try { if (isDocumentResult) { event.fire((Document)returnObject); Index: builtin/src/main/java/org/hippoecm/repository/standardworkflow/WorkflowEventWorkflow.java =================================================================== --- builtin/src/main/java/org/hippoecm/repository/standardworkflow/WorkflowEventWorkflow.java (revision 32939) +++ builtin/src/main/java/org/hippoecm/repository/standardworkflow/WorkflowEventWorkflow.java (working copy) @@ -29,6 +29,7 @@ * call automatically. Only a single fire method is applicable at a specific workflow event * that is triggered. Which one depends on the actual workflow call (which caused the trigger * to fire) and condition that is being met. + * @deprecated use interface WorkflowEventsWorkflow (plural) instead. */ public interface WorkflowEventWorkflow extends Workflow { /** Index: builtin/src/main/java/org/hippoecm/repository/standardworkflow/WorkflowEventsWorkflow.java =================================================================== --- builtin/src/main/java/org/hippoecm/repository/standardworkflow/WorkflowEventsWorkflow.java (revision 0) +++ builtin/src/main/java/org/hippoecm/repository/standardworkflow/WorkflowEventsWorkflow.java (working copy) @@ -0,0 +1,46 @@ +/* + * Copyright 2012 Hippo. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.hippoecm.repository.standardworkflow; + +/** + * Workflows that are executed as part of workflow events must implement this interface. + * This ensures that when a workflow event is fired, the repository knows which interface to + * call automatically. Only a single fire method is applicable at a specific workflow event + * that is triggered. Which one depends on the actual workflow call (which caused the trigger + * to fire) and condition that is being met. + * + * This interface is an extension to the now deprecated WorkflowEventWorkflow interface, and + * in addition sets the category and method names of the Workflow triggering the event + * before the fire method is invoked. + */ +public interface WorkflowEventsWorkflow extends WorkflowEventWorkflow { + /** + * @exclude + */ + static final String SVN_ID = "$Id$"; + + /** + * This method is called before a workflow event is fired passing in the concrete category name of the Worfklow + * triggering this event. + */ + public void setWorkflowCategory(String category); + + /** + * This method is called before a workflow event is fired passing in the concrete method name of the Worfklow + * triggering this event. + */ + public void setWorkflowMethod(String method); +} Property changes on: builtin/src/main/java/org/hippoecm/repository/standardworkflow/WorkflowEventsWorkflow.java ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id Added: svn:eol-style ## -0,0 +1 ## +native