org.jbpm.api.activity
Interface ExternalActivityBehaviour

All Superinterfaces:
ActivityBehaviour, java.io.Serializable

public interface ExternalActivityBehaviour
extends ActivityBehaviour

extends ActivityBehaviour for handling external triggers after a wait state.

Process languages will provide a set of these activity implementations. But languages like jPDL even allow users to provide their own activity behaviour with this interface.

Author:
Tom Baeyens

Method Summary
 void signal(ActivityExecution execution, java.lang.String signalName, java.util.Map<java.lang.String,?> parameters)
          handles an external trigger.
 
Methods inherited from interface org.jbpm.api.activity.ActivityBehaviour
execute
 

Method Detail

signal

void signal(ActivityExecution execution,
            java.lang.String signalName,
            java.util.Map<java.lang.String,?> parameters)
            throws java.lang.Exception
handles an external trigger.

An external trigger that comes into an execution through one of the Execution#signal() methods, will be delegated to the activity in which the execution is positioned when it receives the external trigger.

The signal method implements how the activity will react on that signal. For example, the outgoing transition could be taken that corresponds with the given signal.

Parameters:
execution - the Execution for which the signal is given
signalName - is an abstract text that can be associated with a signal. this corresponds to e.g. a method name in a java class interface. The implementation can decide e.g. to use the signal to identify the outgoing transition.
parameters - is extra information that can be provided with a signal. In this way, it is somewhat similar to the parameters that can be fed into a method invocation through reflection.
Throws:
java.lang.Exception - to indicate any kind of failure. Note that exceptions are considered non recoverable. After an Exception, the execution should not be used any more and if this is during a transaction, the transaction should be rolled back.


Copyright © 2009 JBoss, a division of Red Hat. All Rights Reserved.