Package com.suncode.pwfl.workflow
Class AcceptanceContext
java.lang.Object
com.suncode.pwfl.workflow.WorkflowContext
com.suncode.pwfl.workflow.AcceptanceContext
- All Implemented Interfaces:
Context
Acceptance
Context. Active during acceptance of an activity (started by user).- Author:
- RafaĆ Nowacki 13 cze 2016
-
Field Summary
FieldsFields inherited from class com.suncode.pwfl.workflow.WorkflowContext
enableLog -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAcceptanceContext(String processId, String activityId, String actionName) -
Method Summary
Modifier and TypeMethodDescriptionstatic AcceptanceContextActivates acceptance context.static voidactivate(String processId, String activityId, String actionName, InContext<AcceptanceContext> action) Activates acceptance context and invokes provided action in created context.static AcceptanceContextcurrent()Returns current acceptance context;static AcceptanceContextDeactivates current acceptance contextvoidvoidReturns action name or null if default acceptance path is evaluated.static booleanisActive()Returns true if this context is active.booleanReturns true if default acceptance path is evaluated.name()Returns this context name (for identification purposes)Methods inherited from class com.suncode.pwfl.workflow.WorkflowContext
activateFunctionContext, deactivateFunctionContext, getActivityDefId, getActivityDelegations, getActivityId, getPackageId, getProcessDefId, getProcessId
-
Field Details
-
NAME
- See Also:
-
-
Constructor Details
-
AcceptanceContext
-
-
Method Details
-
name
Description copied from interface:ContextReturns this context name (for identification purposes)- Specified by:
namein interfaceContext- Overrides:
namein classWorkflowContext
-
getActionName
Returns action name or null if default acceptance path is evaluated.- Returns:
- action name
-
isDefaultAction
public boolean isDefaultAction()Returns true if default acceptance path is evaluated.- Returns:
- true for default action
-
isActive
public static boolean isActive()Returns true if this context is active. -
current
Returns current acceptance context;- Throws:
ContextNotActiveException
-
activate
Activates acceptance context.- Parameters:
processId- process idactivityId- activity idactionName- action name- Returns:
- active acceptance context
-
activate
public static void activate(String processId, String activityId, String actionName, InContext<AcceptanceContext> action) Activates acceptance context and invokes provided action in created context.- Parameters:
processId- process idactivityId- activity idactionName- action nameaction- action executed in activated context
-
deactivate
Deactivates current acceptance context- Returns:
- deactivated context
-
disableLogging
public void disableLogging()- Specified by:
disableLoggingin classWorkflowContext
-
enableLogging
public void enableLogging()- Specified by:
enableLoggingin classWorkflowContext
-