org.jbpm.api.activity
Interface ActivityExecution

All Superinterfaces:
Execution, OpenExecution, java.io.Serializable

public interface ActivityExecution
extends OpenExecution

view upon an Execution exposed to ActivityBehaviour implementations.

Author:
Tom Baeyens

Field Summary
 
Fields inherited from interface org.jbpm.api.Execution
STATE_ACTIVE_CONCURRENT, STATE_ACTIVE_ROOT, STATE_ASYNC, STATE_CREATED, STATE_ENDED, STATE_INACTIVE_CONCURRENT_ROOT, STATE_INACTIVE_JOIN, STATE_INACTIVE_SCOPE, STATE_SUSPENDED
 
Method Summary
 void end()
          ends this execution and all of its child executions.
 void end(java.lang.String state)
          ends this execution and all it's child executions with a user defined status.
 void execute(java.lang.String activityName)
          executes the given nested activity.
 java.lang.String getActivityName()
          represents the current position in the process by indicating the name of the current activity.
 void setPriority(int priority)
          setter for the priority.
 void take(java.lang.String transitionName)
          takes the outgoing transition with the given name.
 void takeDefaultTransition()
          takes the default transition.
 void waitForSignal()
          makes this execution wait in the current activity until an external trigger is given with one of the signal methods.
 
Methods inherited from interface org.jbpm.api.model.OpenExecution
createVariable, findActiveExecutionIn, getActivity, getExecution, getParent, getProcessInstance, getSubProcessInstance, getVariable, getVariableKeys, getVariables, hasVariable, hasVariables, removeVariable, removeVariables, setState, setVariable, setVariables
 
Methods inherited from interface org.jbpm.api.Execution
findActiveActivityNames, getExecutions, getExecutionsMap, getId, getIsProcessInstance, getKey, getName, getPriority, getProcessDefinitionId, getState, hasExecution, isActive, isEnded, isSuspended
 

Method Detail

getActivityName

java.lang.String getActivityName()
represents the current position in the process by indicating the name of the current activity.


waitForSignal

void waitForSignal()
makes this execution wait in the current activity until an external trigger is given with one of the signal methods.


takeDefaultTransition

void takeDefaultTransition()
takes the default transition.

This method can only be called from inside ExternalActivityBehaviour implementations.

Throws:
JbpmException - in case there is no default transition in the current activity or in case this method is called from inside an ActivityBehaviour

take

void take(java.lang.String transitionName)
takes the outgoing transition with the given name.

This method can only be called from inside ExternalActivityBehaviour implementations.

Transitions will be looked up recursively starting from the current activity and then up the activity-parent-hierarchy

Parameters:
transitionName - is the name of the transition to take. A null value will match the first unnamed transition.
Throws:
JbpmException - in case no such transition is found in the current activity or in case this method is called from inside an ActivityBehaviour.

execute

void execute(java.lang.String activityName)
executes the given nested activity.

The activityName is looked up in the current activity's nested activities.

This method can only be called from inside ExternalActivityBehaviour implementations.


end

void end()
ends this execution and all of its child executions.

The execution will be removed from it's parent. Potentially this can cause a parent execution to start executing in case this is the last concurrent execution for which the parent is waiting.


end

void end(java.lang.String state)
ends this execution and all it's child executions with a user defined status.

It is not recommended to use any of the defined statuses in Execution as that may case unpredictable side effects.

The execution will be removed from it's parent.


setPriority

void setPriority(int priority)
setter for the priority. The default priority is 0, which means NORMAL. Other recognized named priorities are HIGHEST (2), HIGH (1), LOW (-1) and LOWEST (-2). For the rest, the user can set any other priority integer value, but then, the UI will have to display it as an integer and not the named value.

Specified by:
setPriority in interface OpenExecution


Copyright © 2010 JBoss Community. All Rights Reserved.