WebLogic Integration


com.bea.wlpi.server.plugin
Interface PluginEvent


public interface PluginEvent
extends PluginObject

The interface that a plugin must implement to define a new event node type.

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

Method Summary
 int activate(EventContext eventContext, ExecutionContext execContext)
          Activate this event.
 void fixup(com.bea.wlpi.evaluator.ExpressionParser parser)
          The framework calls this method after parsing the template definition.
 int trigger(EventContext eventContext, ExecutionContext execContext)
          Trigger this event.
 
Methods inherited from interface com.bea.wlpi.common.plugin.PluginObject
load
 
Methods inherited from interface org.xml.sax.ContentHandler
characters, endDocument, endElement, endPrefixMapping, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startElement, startPrefixMapping
 

Method Detail

activate

public int activate(EventContext eventContext,
                    ExecutionContext execContext)
             throws WorkflowException
Activate this event. The event processor calls this method when the matching event is activated by an incoming transition from a predecessor node. Plugins use this call to record an event watch to enable the event processor to match an incoming event datum to this particular node and workflow instance. Plugins can use the default event watch registration, addressed message handling and event matching facility simply by calling EventContext.activateEvent(com.bea.wlpi.server.common.ExecutionContext, java.lang.String, java.lang.String, java.lang.String, java.lang.String). Plugins are responsible for recording the necessary information in a plugin-specific way, and for providing an event handler to perform the run-time matching based on these criteria. If the plugin does not rely on the WebLogic Process Integrator generic JMS event listener it is not required to provide an event handler.

Parameters:
eventContext - The event node context. This object provides access to run-time event related services such as event watch registration.
execContext - The execution context. This object provides access to the runtime context, including the template ID, template definition ID, workflow instance ID, event data, and various services related to workflow enactment.
Returns:
A value to indicate whether to continue workflow processing following the activation: ExecutionContext.CONTINUE or ExecutionContext.STOP.
See Also:
trigger(com.bea.wlpi.server.plugin.EventContext, com.bea.wlpi.server.common.ExecutionContext)

trigger

public int trigger(EventContext eventContext,
                   ExecutionContext execContext)
            throws WorkflowException
Trigger this event. The event processor calls this method when it detects an incoming event that matches the criteria for this event node. Plugins that use the default event watch registration and matching services must call EventContext.removeEventWatch(com.bea.wlpi.server.common.ExecutionContext) from this method, to place the event node to the non-listening state. Plugins that do not use the default event watch registration and matching services must deactivate whatever plugin-supplied event watch record they established for this node in the prior activate(com.bea.wlpi.server.plugin.EventContext, com.bea.wlpi.server.common.ExecutionContext) call. They are also required either to provide an event handler if the event arrives via the WebLogic Process Integrator generic JMS event listener, or to implement their own listener service by whatever means (TCP/IP socket, RMI, polling etc.).

Parameters:
eventContext - The event node context. This object provides access to run-time event related services such as event watch registration.
execContext - The execution context. This object provides access to the runtime context, including the template ID, template definition ID, workflow instance ID, event data, and various services related to workflow enactment.
Returns:
A value to indicate whether to continue workflow processing following the trigger. That is, whether to set workflow variables from the incoming event datum, execute any associated actions, and activate successor nodes. Valid return values are: ExecutionContext.CONTINUE or ExecutionContext.STOP.
See Also:
activate(com.bea.wlpi.server.plugin.EventContext, com.bea.wlpi.server.common.ExecutionContext)

fixup

public void fixup(com.bea.wlpi.evaluator.ExpressionParser parser)
           throws WorkflowException
The framework calls this method after parsing the template definition. This provides the plugin event with an opportunity to compile any expressions it has.

Parameters:
parser - The expression parser to use. N.B. This object is not thread-safe: plug-ins must not keep a reference to it. This parameter is provided for backwards compatibility only. Plug-ins should use the factory method Expression.getExpression(String) or one of its overloads to compile their expressions.
Throws:
WorkflowException - if any of the expressions are invalid.

WebLogic Integration

WebLogic Integration (WLI)