Package com.jscape.inet.mft.workflow
Interface Action
-
- All Known Implementing Classes:
AbstractAction
public interface ActionRepresents an abstraction for executing custom tasks if an event occurs. Action is executed only once after creation. The interface introduces methods and properties required by action invocation infrastructure.- Author:
- Alex Usun
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classAction.ActionExceptionRepresents an action execution error.
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidexecute(com.jscape.inet.mftserver.operation.Domain domain, com.jscape.inet.mft.events.DomainEvent<?> event, ExpressionContext expressionContext, java.lang.String triggerName, java.lang.String triggerTaskId)java.lang.StringgetDescription()Returns action description used in Manager GUI.default java.lang.StringgetDisplayName()Returns action display name.java.lang.StringgetGroup()Returns action group name.intgetPriority()Returns the action priority.java.lang.StringgetPropertyDescription(java.lang.String propertyName)Returns action property description.PropertyDescriptor[]getPropertyDescriptors()Returns action properties descriptors used for creating action properties panel in Manager GUI.java.lang.StringgetPropertyExample(java.lang.String propertyName)Returns action property usage example.java.lang.ObjectgetResult()java.lang.StringgetResultMessage()Returns result message for logging.java.lang.StringgetTriggerErrorMessage()Returns an error message passed to Trigger Error Event.java.lang.StringgetTriggerName()Returns parent trigger name.booleanisLogAction()Returns action loggable flag.booleanisSuccess()Returns action success flag.voidsetLogAction(boolean value)Sets action loggable flag.voidsetPriority(int value)Sets the action priority.
-
-
-
Method Detail
-
getDisplayName
default java.lang.String getDisplayName()
Returns action display name.- Returns:
- action display name
-
getDescription
java.lang.String getDescription()
Returns action description used in Manager GUI.- Returns:
- action description text
-
getPropertyDescription
java.lang.String getPropertyDescription(java.lang.String propertyName)
Returns action property description. Used for creating action properties help panel in Manager GUI.- Parameters:
propertyName- the property name- Returns:
- property description text
-
getPropertyExample
java.lang.String getPropertyExample(java.lang.String propertyName)
Returns action property usage example. Used for creating action properties help panel in Manager GUI.- Parameters:
propertyName- the property name- Returns:
- property usage example
-
getPropertyDescriptors
PropertyDescriptor[] getPropertyDescriptors()
Returns action properties descriptors used for creating action properties panel in Manager GUI.- Returns:
- action properties descriptors
-
getGroup
java.lang.String getGroup()
Returns action group name.- Returns:
- action group name
-
isLogAction
boolean isLogAction()
Returns action loggable flag.- Returns:
trueif action should be logged;falseotherwise
-
setLogAction
void setLogAction(boolean value)
Sets action loggable flag.- Parameters:
value- iftrueaction will be logged
-
getTriggerName
java.lang.String getTriggerName()
Returns parent trigger name.- Returns:
- parent trigger name
-
getTriggerErrorMessage
java.lang.String getTriggerErrorMessage()
Returns an error message passed to Trigger Error Event.- Returns:
- an error message
-
getResultMessage
java.lang.String getResultMessage()
Returns result message for logging.- Returns:
- a result message
-
getResult
java.lang.Object getResult()
-
isSuccess
boolean isSuccess()
Returns action success flag.- Returns:
trueif action was successful executed;falseotherwise
-
getPriority
int getPriority()
Returns the action priority.- Returns:
- the action priority
-
setPriority
void setPriority(int value)
Sets the action priority.- Parameters:
value- the action priority
-
execute
void execute(com.jscape.inet.mftserver.operation.Domain domain, com.jscape.inet.mft.events.DomainEvent<?> event, ExpressionContext expressionContext, java.lang.String triggerName, java.lang.String triggerTaskId) throws Action.ActionException- Throws:
Action.ActionException
-
-