org.obe.client.api.tool
Class ToolInvocation
java.lang.Object
org.obe.client.api.tool.ToolInvocation
- All Implemented Interfaces:
- java.io.Serializable
- public final class ToolInvocation
- extends java.lang.Object
- implements java.io.Serializable
Encapsulates the invocation of a tool (application or procedure). This class
can be used directly by thick Java clients (apps & applets), in order to
support tool types other than native executables. Thin clients can use this
class to generate the JavaScript to invoke the requisite application from an
HTML browser.
- Author:
- Adrian Price
- See Also:
WMClient.executeWorkItem(java.lang.String, java.lang.String)
,
Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
META_DATA
public static final int META_DATA
- See Also:
- Constant Field Values
TOOL_AGENT
public static final int TOOL_AGENT
- See Also:
- Constant Field Values
procInstId
public final java.lang.String procInstId
workItemName
public final java.lang.String workItemName
workItemId
public final java.lang.String workItemId
toolId
public final java.lang.String toolId
toolIndex
public final int toolIndex
metaData
public final ToolAgentMetaData metaData
toolType
public final ToolType toolType
agent
public final ToolAgent agent
parameters
public final Parameter[] parameters
description
public final java.lang.String description
exception
public java.lang.Exception exception
ToolInvocation
public ToolInvocation(java.lang.String procInstId,
java.lang.String workItemName,
java.lang.String workItemId,
java.lang.String toolId,
int toolIndex,
ToolAgentMetaData metaData,
ToolType toolType,
ToolAgent agent,
Parameter[] parameters,
java.lang.String description)
invokeTool
public void invokeTool(WMClient client,
boolean sync)
- Invokes the tool agent, synchronously or asynchronously.
- Parameters:
client
- The client connection to use. This must be valid if called
by a remote client, and must be null
when called internally
by the workflow engine to invoke a procedure.sync
- true
to invoke the tool synchronously.
renderInvocationScript
public void renderInvocationScript(WMClient client,
java.io.Writer writer)
throws java.io.IOException,
WMWorkflowException
- Renders the JavaScript necessary to invoke the tool from an HTML browser.
The implementation optionally calls
WMClient.toolStarted(java.lang.String, java.lang.String)
to
signal to the workflow engine that tool execution has begun.
- Parameters:
client
- The client connection to use.writer
- The writer to which the JavaScript should be written.
- Throws:
java.io.IOException
- If a problem occurred when writing the JavaScript.
WMWorkflowException
- If a problem occurred when calling the client.
requestAppStatus
public int requestAppStatus()
terminateApp
public void terminateApp()
OBE-1.0 Copyright (c) 2002-2006 Adrian Price. All Rights Reserved.