01: /*
02: * Copyright (c) 2002-2003 by OpenSymphony
03: * All rights reserved.
04: */
05: package com.opensymphony.workflow;
06:
07: import com.opensymphony.module.propertyset.PropertySet;
08:
09: import java.rmi.Remote;
10: import java.rmi.RemoteException;
11:
12: import java.util.Map;
13:
14: /**
15: * Interface that must be implemented to define a java-based remote condition in your workflow definition.
16: *
17: * @author <a href="mailto:plightbo@hotmail.com">Patrick Lightbody</a>
18: */
19: public interface ConditionRemote extends Remote {
20: //~ Methods ////////////////////////////////////////////////////////////////
21:
22: /**
23: * Determines if a condition should signal pass or fail.
24: *
25: * @param transientVars Variables that will not be persisted. These include inputs
26: * given in the {@link Workflow#initialize} and {@link Workflow#doAction} method calls.
27: * There are two special variable names: <b>entry</b> (object type:
28: * {@link com.opensymphony.workflow.spi.WorkflowEntry}) and <b>context</b>
29: * (object type: {@link com.opensymphony.workflow.WorkflowContext}).
30: * Also, any variable set as a {@link com.opensymphony.workflow.Register}), will also be
31: * available in the transient map, no matter what. These transient variables only last through
32: * the method call that they were invoked in, such as {@link Workflow#initialize}
33: * and {@link Workflow#doAction}.
34: * @param args The properties for this function invocation. Properties are created
35: * from arg nested elements within the xml, an arg element takes in a name attribute
36: * which is the properties key, and the CDATA text contents of the element map to
37: * the property value.
38: * @param ps The persistent variables that are associated with the current
39: * instance of the workflow. Any change made to this will be seen on the next
40: * function call in the workflow lifetime.
41: */
42: public boolean passesCondition(Map transientVars, Map args,
43: PropertySet ps) throws RemoteException;
44: }
|