WebLogic Integration


com.bea.wlpi.server.plugin
Interface ActionContext


public interface ActionContext

Provides run-time context and services to plugin actions. The framework passes an instance of this interface to the PluginAction.execute(com.bea.wlpi.server.plugin.ActionContext, com.bea.wlpi.server.common.ExecutionContext) method.

Since:
WebLogic Process Integrator 2.0
Author:
Copyright © 2000, 2001 BEA Systems, Inc. All Rights Reserved.
See Also:
PluginAction, ActionInfo

Method Summary
 int executeSubActionList(int index, ExecutionContext context)
          Iterate through a list of sub-actions, executing each in turn.
 java.lang.String getActionId()
          Return the ID that uniquely identifies this action.
 java.lang.String instantiateWorkflow(ExecutionContext context, java.lang.String orgID, java.lang.String templateID, VariableInfo[] initialValues, java.util.Map pluginData)
          Create a new workflow instance.
 java.lang.String instantiateWorkflow(ExecutionContext context, java.lang.String orgID, java.lang.String templateID, VariableInfo[] initialValues, java.util.Map pluginData, boolean start)
          Create a new workflow instance.
 java.lang.String startWorkflow(ExecutionContext context, java.lang.String instanceID, EventData eventData)
          Start a previously instantiated workflow.
 

Method Detail

executeSubActionList

public int executeSubActionList(int index,
                                ExecutionContext context)
                         throws WorkflowException
Iterate through a list of sub-actions, executing each in turn. The index value identifies which sub-action list to execute. If an exception occurs, invoke the current error handler.

Parameters:
index - The index of the sub-action list to execute. It equates to the index in the classNames member of the corresponding ActionInfo.
context - The execution context passed by the caller.
Returns:
Indicates whether (and how) to continue subsequent processing: ExecutionContext.CONTINUE or ExecutionContext.STOP. If the return value is other than ExecutionContext.CONTINUE, the caller must return immediately, passing on this return value.
Throws:
WorkflowException -  

getActionId

public java.lang.String getActionId()
Return the ID that uniquely identifies this action. This ID is required to support asynchronously executed callbacks to plugin-defined actions: the ID must be passed to the Worklist.response(java.lang.String, java.lang.String, java.lang.String, java.lang.String) method.

Returns:
String The action's unique node ID.

instantiateWorkflow

public java.lang.String instantiateWorkflow(ExecutionContext context,
                                            java.lang.String orgID,
                                            java.lang.String templateID,
                                            VariableInfo[] initialValues,
                                            java.util.Map pluginData)
                                     throws WorkflowException
Create a new workflow instance.

Parameters:
context - The execution context passed by the caller.
orgID - The ID of the organization in which to instantiate the workflow.
templateID - The ID of the workflow template to instantiate.
initialValues - Initial values for workflow variables.
pluginData - A collection of plugin-defined instance data. The map is keyed on plugin name, and each element is a plugin-defined instance datum.
Returns:
A response string as described under Worklist.taskExecute(java.lang.String, java.lang.String, java.lang.String). The caller can perform a SAX parse of this XML document to obtain the instanceID and templateDefinitionID of the new instance.
Throws:
WorkflowException - if the workflow could not be instantiated.

instantiateWorkflow

public java.lang.String instantiateWorkflow(ExecutionContext context,
                                            java.lang.String orgID,
                                            java.lang.String templateID,
                                            VariableInfo[] initialValues,
                                            java.util.Map pluginData,
                                            boolean start)
                                     throws WorkflowException
Create a new workflow instance.

Parameters:
context - The execution context passed by the caller.
orgID - The ID of the organization in which to instantiate the workflow.
templateID - The ID of the workflow template to instantiate.
initialValues - Initial values for workflow variables.
pluginData - A collection of plugin-defined instance data. The map is keyed on plugin name, and each element is a plugin-defined instance datum.
start - true to start the new workflow instance immediately, false to leave it suspended.
Returns:
A response string as described under Worklist.taskExecute(java.lang.String, java.lang.String, java.lang.String). The caller can perform a SAX parse of this XML document to obtain the instanceID and templateDefinitionID of the new instance, or the instance ID if the start == false.
Throws:
WorkflowException - if the workflow could not be instantiated.
Since:
WebLogic Integration 2.1
See Also:
startWorkflow(ExecutionContext, String, EventData)

startWorkflow

public java.lang.String startWorkflow(ExecutionContext context,
                                      java.lang.String instanceID,
                                      EventData eventData)
                               throws WorkflowException
Start a previously instantiated workflow. The workflow must have been instantiated in the suspended state.

Parameters:
context - The execution context passed by the caller.
instanceID - The ID of the workflow instance to start.
eventData - The event data to present to the called start nodes.
Returns:
A response string as described under Worklist.taskExecute(java.lang.String, java.lang.String, java.lang.String).
Throws:
WorkflowException - if the workflow instance could not be found, or is already started.
Since:
WebLogic Integration 2.1
See Also:
instantiateWorkflow(ExecutionContext, String, String, VariableInfo[], Map, boolean)

WebLogic Integration

WebLogic Integration (WLI)