Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Lenya Wiki" for change 
notification.

The following page has been changed by AndreasHartmann:
http://wiki.apache.org/lenya/HowToCustomWorkflowAction

New page:
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);
    }

}

}}}

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to