Interface DecisionActivity
-
- All Superinterfaces:
AbstractActivity
,Activity
,BuildtimeActivity
,ExecutableBusinessProcess
,LocalisedString
,PluginDataContainer
,UserAttributeContainer
public interface DecisionActivity extends Activity
Represents an activity which is used for decisions in the process model.A decision activity has only one special output parameter of type INTEGER (
getDecisionParameter()
). The return value of the parameter is the decision ID. This ID can be mapped in the process model to branch IDs - e.g. of outgoing edges of an XOR split.Since the decision IDs need to be mapped to branch IDs, and the integrity of the mapping and the consistency to the actual branches needs to be checked, all possible decision IDs need to be known in advance. More precisely, all possible return values of
getDecisionParameter()
are returned bygetDecisionIDs()
.Note: for the runtime manager, the decision activity will be wrapped. The runtime manager handles the decision activity as a normal activity, and may expect the decision parameter to be returned within
ExecutableBusinessProcess.getParameters(de.aristaflow.adept2.model.globals.ActivityConstants.AccessType)
.- Author:
- Kevin Goeser
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description long[]
getDecisionID(long edgeCode)
Returns the decision ID for the given edge code.long[]
getDecisionIDs()
Returns all possible decision IDs, i.e. all possible return values of the parameter.String
getDecisionLabel(long decisionID)
Returns the label which is associated with the given decision ID.ProcessModelParameter
getDecisionParameter()
Returns the decision parameter.DecisionStatement
getDecisionStatement(long decisionID)
Returns the statement that is associated with the given decision ID.Map<Long,DecisionStatement>
getDecisionStatements()
Gets all decision statements of this decision activity instance indexed by the corresponding decision ID.long
getEdgeCode(long decisionID)
Returns the edge code for the given decision ID.-
Methods inherited from interface de.aristaflow.adept2.model.common.AbstractActivity
getActivityName, getAttributeOrigins, getClassLoaderUsage, getClassPath, getConfigurationName, getDescription, getExecutableComponentName, getExecutionControlProperties, getGUIContextID, getIconID, getID, getImplementationClass, getOperationName, getParameter, getParameters, getSeparatedClassPaths, getSystemComponent, supportsViewOnly
-
Methods inherited from interface de.aristaflow.adept2.model.processmodel.Activity
getConfiguration, getTestConfiguration
-
Methods inherited from interface de.aristaflow.adept2.model.common.BuildtimeActivity
getParameterChangePolicy, supportsTestExecution
-
Methods inherited from interface de.aristaflow.adept2.model.processmodel.ExecutableBusinessProcess
getExecutionControlProperties, getParameter, getParameters, getType
-
Methods inherited from interface de.aristaflow.adept2.model.common.i18n.LocalisedString
toLocalisedString
-
Methods inherited from interface de.aristaflow.adept2.model.common.PluginDataContainer
getPluginData, getPluginDatas, getSupportedPlugins
-
Methods inherited from interface de.aristaflow.adept2.model.common.UserAttributeContainer
getUserAttributes, getUserAttributeValue, removeUserAttributeValue, setUserAttributeValue
-
-
-
-
Method Detail
-
getDecisionParameter
ProcessModelParameter getDecisionParameter()
Returns the decision parameter. The parameter must be of type INTEGER (ProcessConstants.AdeptDataType.INTEGER
).All possible values of the parameter are known and can be retrieved via
getDecisionIDs()
.- Returns:
- The description of the decision parameter.
-
getDecisionLabel
String getDecisionLabel(long decisionID)
Returns the label which is associated with the given decision ID. The decision label is not localised. If you need the localised label usegetDecisionStatements()
.- Parameters:
decisionID
- The decision ID.- Returns:
- The (non-localised) label for the given decision ID.
-
getDecisionStatement
DecisionStatement getDecisionStatement(long decisionID)
Returns the statement that is associated with the given decision ID. If you want it localised, wrap it appropriately.- Parameters:
decisionID
- The decision ID- Returns:
- The decision statement for the given decision ID.
-
getDecisionIDs
long[] getDecisionIDs()
Returns all possible decision IDs, i.e. all possible return values of the parameter.- Returns:
- The decision IDs.
-
getDecisionStatements
Map<Long,DecisionStatement> getDecisionStatements()
Gets all decision statements of this decision activity instance indexed by the corresponding decision ID. The returned decision statement instances may be subject of localisation, the caller needs to wrap them appropriately for this.- Returns:
- A map of all decision statements of this decision activity instance indexed by the corresponding decision ID.
-
getDecisionID
long[] getDecisionID(long edgeCode)
Returns the decision ID for the given edge code.- Parameters:
edgeCode
- The edge code for which the decision ID is needed.- Returns:
- The decision ID for the given edge code
-
getEdgeCode
long getEdgeCode(long decisionID)
Returns the edge code for the given decision ID.- Parameters:
decisionID
- The decision ID for which the edge code is needed.- Returns:
- The edge code for the given decision ID
-
-