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: * Remote interface to be implemented by any class that are to be called from within a workflow as a function,
16: * either as a pre-function or a post-function. The args nested elements within the function xml call
17: * will be mapped to the properties parameter.
18: *
19: * @author <a href="mailto:plightbo@hotmail.com">Pat Lightbody</a>
20: */
21: public interface FunctionProviderRemote extends Remote {
22: //~ Methods ////////////////////////////////////////////////////////////////
23:
24: /**
25: * Execute this function
26: * @param transientVars Variables that will not be persisted. These include inputs
27: * given in the {@link Workflow#initialize} and {@link Workflow#doAction} method calls.
28: * There are two special variable names: <b>entry</b> (object type:
29: * {@link com.opensymphony.workflow.spi.WorkflowEntry}) and <b>context</b>
30: * (object type: {@link com.opensymphony.workflow.WorkflowContext}).
31: * Also, any variable set as a {@link com.opensymphony.workflow.Register}), will also be
32: * available in the transient map, no matter what. These transient variables only last through
33: * the method call that they were invoked in, such as {@link Workflow#initialize}
34: * and {@link Workflow#doAction}.
35: * @param args The properties for this function invocation. Properties are created
36: * from arg nested elements within the xml, an arg element takes in a name attribute
37: * which is the properties key, and the CDATA text contents of the element map to
38: * the property value.
39: * @param ps The persistent variables that are associated with the current
40: * instance of the workflow. Any change made to the propertyset are persisted to
41: * the propertyset implementation's persistent store.
42: */
43: public void execute(Map transientVars, Map args, PropertySet ps)
44: throws RemoteException;
45: }
|