org.smartcomps.twister.engine.priv.core.dynamic
Interface ExecutionContext

All Known Subinterfaces:
AssignEC, BasicEC, EmptyEC, FlowEC, InvokeEC, PickEC, ReceiveEC, ReplyEC, SequenceEC, StructuredEC, SwitchEC, TerminateEC, WaitEC, WhileEC
All Known Implementing Classes:
AssignECImpl, BasicECImpl, EmptyECImpl, ExecutionContextImpl, FlowECImpl, InvokeECImpl, PickECAsReceiveEC, PickECImpl, ReceiveECImpl, ReplyECImpl, SequenceECImpl, StructuredECImpl, SwitchECImpl, TerminateECImpl, WaitECImpl, WhileECImpl

public interface ExecutionContext

The execution context of an Activity, has details about the execution history of the activity and is specialized for each type of activity, knowing therefore how to execute each of those type.


Field Summary
static int ACTIVE
          The Execution Context is currently running.
static int CANCELED
          The Exection Context received a cancellation signal from a user or another service.
static int COMPLETED
          The Execution Context has been properly completed.
static int ENDED_CANCELED
          This Execution Context has been ended in a canceled status.
static int ENDED_COMPLETED
          This Execution Context has been ended in a completed status (parent process has finished execution).
static int ENDED_FAULTED
          This Execution Context has been ended in a failed status.
static int FAULTED
          An error occured that prevented the Execution Context to finish its execution properly.
static int OPEN
          The Execution Context has been created but is not active yet, not doing its job (like waiting for a message, invoking a service or looping).
 
Method Summary
 void execute()
           
 org.smartcomps.twister.engine.priv.core.dynamic.ProcessInstance fetchInstance()
          Browse the hierarchy tree through all containers to fetch the process instance this execution context is included in.
 org.smartcomps.twister.engine.priv.core.dynamic.StructuredEC getContainer()
          Returns the structured execution context containing this execution context (we could call it a parent execution context).
 java.util.Collection getEvents()
           
 java.lang.Long getId()
           
 org.smartcomps.twister.engine.priv.core.dynamic.ProcessInstance getInstance()
          Returns the ProcessInstance if this execution context is root or null otherwise.
 int getStatus()
           
 void setStatus(int status)
           
 

Field Detail

OPEN

public static final int OPEN
The Execution Context has been created but is not active yet, not doing its job (like waiting for a message, invoking a service or looping).

See Also:
Constant Field Values

ACTIVE

public static final int ACTIVE
The Execution Context is currently running.

See Also:
Constant Field Values

COMPLETED

public static final int COMPLETED
The Execution Context has been properly completed.

See Also:
Constant Field Values

CANCELED

public static final int CANCELED
The Exection Context received a cancellation signal from a user or another service.

See Also:
Constant Field Values

FAULTED

public static final int FAULTED
An error occured that prevented the Execution Context to finish its execution properly.

See Also:
Constant Field Values

ENDED_COMPLETED

public static final int ENDED_COMPLETED
This Execution Context has been ended in a completed status (parent process has finished execution).

See Also:
Constant Field Values

ENDED_CANCELED

public static final int ENDED_CANCELED
This Execution Context has been ended in a canceled status. (parent process has finished execution).

See Also:
Constant Field Values

ENDED_FAULTED

public static final int ENDED_FAULTED
This Execution Context has been ended in a failed status. (parent process has finished execution).

See Also:
Constant Field Values
Method Detail

getId

public java.lang.Long getId()

getContainer

public org.smartcomps.twister.engine.priv.core.dynamic.StructuredEC getContainer()
Returns the structured execution context containing this execution context (we could call it a parent execution context). Returns null if this execution context is the root one, only contained by the process instance.

Returns:
StructuredEC or null if the container is the process instance.

getInstance

public org.smartcomps.twister.engine.priv.core.dynamic.ProcessInstance getInstance()
Returns the ProcessInstance if this execution context is root or null otherwise.

Returns:
ProcessInstance or null

fetchInstance

public org.smartcomps.twister.engine.priv.core.dynamic.ProcessInstance fetchInstance()
Browse the hierarchy tree through all containers to fetch the process instance this execution context is included in.

Returns:
ProcessInstance

getStatus

public int getStatus()

setStatus

public void setStatus(int status)

getEvents

public java.util.Collection getEvents()

execute

public void execute()


Copyright © 2003 SmartComps. All Rights Reserved.