View Javadoc
1 package org.smartcomps.twister.engine.priv.core.dynamic; 2 3 import java.util.Collection; 4 5 /*** 6 * The execution context of an Activity, has details about the execution 7 * history of the activity and is specialized for each type of activity, 8 * knowing therefore how to execute each of those type. 9 */ 10 public interface ExecutionContext { 11 12 /*** 13 * The Execution Context has been created but is not active yet, not 14 * doing its job (like waiting for a message, invoking a service or 15 * looping). 16 */ 17 public final static int OPEN = 0; 18 /*** 19 * The Execution Context is currently running. 20 */ 21 public final static int ACTIVE = 1; 22 /*** 23 * The Execution Context has been properly completed. 24 */ 25 public final static int COMPLETED = 2; 26 /*** 27 * The Exection Context received a cancellation signal from a user or 28 * another service. 29 */ 30 public final static int CANCELED = 3; 31 /*** 32 * An error occured that prevented the Execution Context to finish 33 * its execution properly. 34 */ 35 public final static int FAULTED = 4; 36 /*** 37 * This Execution Context has been ended in a completed status 38 * (parent process has finished execution). 39 */ 40 public final static int ENDED_COMPLETED = 5; 41 /*** 42 * This Execution Context has been ended in a canceled status. 43 * (parent process has finished execution). 44 */ 45 public final static int ENDED_CANCELED = 6; 46 /*** 47 * This Execution Context has been ended in a failed status. 48 * (parent process has finished execution). 49 */ 50 public final static int ENDED_FAULTED = 7; 51 52 public Long getId(); 53 54 /*** 55 * Returns the structured execution context containing this execution 56 * context (we could call it a parent execution context). Returns null 57 * if this execution context is the root one, only contained by the 58 * process instance. 59 * @return StructuredEC or null if the container is the process instance. 60 */ 61 public StructuredEC getContainer(); 62 63 /*** 64 * Returns the ProcessInstance if this execution context is root or null 65 * otherwise. 66 * @return ProcessInstance or null 67 */ 68 public ProcessInstance getInstance(); 69 /*** 70 * Browse the hierarchy tree through all containers to fetch the process instance 71 * this execution context is included in. 72 * @return ProcessInstance 73 */ 74 public ProcessInstance fetchInstance(); 75 76 public int getStatus(); 77 public void setStatus(int status); 78 79 public Collection getEvents(); 80 81 public void execute(); 82 83 }

This page was automatically generated by Maven