|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ExternalActivity
extends Activity
for handling external triggers after a wait state.
Process languages will provide a set of these node implementations. But languages like jPDL even allow users to provide their own node behaviour with this interface.
Field Summary | |
---|---|
static java.util.Set<SignalDefinition> |
DEFAULT_SIGNAL_SET
|
Method Summary | |
---|---|
java.util.Set<SignalDefinition> |
getSignals(Execution execution)
the list of signals that this node behaviour can handle in signal(Execution, String, Map) . |
void |
signal(Execution execution,
java.lang.String signalName,
java.util.Map<java.lang.String,java.lang.Object> parameters)
handles an external trigger. |
Methods inherited from interface org.jbpm.pvm.Activity |
---|
execute |
Field Detail |
---|
static final java.util.Set<SignalDefinition> DEFAULT_SIGNAL_SET
Method Detail |
---|
java.util.Set<SignalDefinition> getSignals(Execution execution) throws java.lang.Exception
signal(Execution, String, Map)
.
This enables some form of reflection on a process execution.
For easy creation of signal definition sets, see the fluent
builder interface of SignalDefinition
.
If the returned list is null, it means that this functionality is unavailable.
To indicate that only the default signal is available, DEFAULT_SIGNAL_SET
can
be used. Nodes can assume that the given
execution is positioned in the node so they don't have to check that.
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.void signal(Execution execution, java.lang.String signalName, java.util.Map<java.lang.String,java.lang.Object> parameters) throws java.lang.Exception
An external trigger that comes into an execution
through one of the Execution.signal()
methods, will be delegated to
the node in which the execution is positioned when it receives the external
trigger.
The signal method implements how the node will react on that signal. For example, the outgoing transition could be taken that corresponds with the given signal.
execution
- the Execution
for which the signal is givensignalName
- 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.
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.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |