Differences between revisions 2 and 3
Revision 2 as of 2005-09-20 07:31:17
Size: 681
Comment:
Revision 3 as of 2009-09-20 23:28:00
Size: 681
Editor: localhost
Comment: converted to 1.6 markup
No differences found!

Here's an example for a custom workflow action which is complied when the current user is the creator of the document:

public class CreatorCondition extends AbstractCondition {

    public boolean isComplied(situation, instance) {

        WorkflowDocument wfDoc = (WorkflowDocument) instance;
        Document doc = wfDoc.getDocument();

        String creator = doc.getDublinCore()
                            .getFirstValue(DublinCore.ELEMENT_CREATOR);

        CMSSituation situationImpl = (CMSSituation) situation;
        String currentUser = situationImpl.getUserId();

        return creator != null && creator.equals(currentUser);
    }

}

HowToCustomWorkflowAction (last edited 2009-09-20 23:28:00 by localhost)