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
ConstructorsModifierConstructorDescriptionprotected
AcceptanceContext
(String processId, String activityId, String actionName) -
Method Summary
Modifier and TypeMethodDescriptionstatic AcceptanceContext
Activates acceptance context.static void
activate
(String processId, String activityId, String actionName, InContext<AcceptanceContext> action) Activates acceptance context and invokes provided action in created context.static AcceptanceContext
current()
Returns current acceptance context;static AcceptanceContext
Deactivates current acceptance contextvoid
void
Returns action name or null if default acceptance path is evaluated.static boolean
isActive()
Returns true if this context is active.boolean
Returns 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:Context
Returns this context name (for identification purposes)- Specified by:
name
in interfaceContext
- Overrides:
name
in 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:
disableLogging
in classWorkflowContext
-
enableLogging
public void enableLogging()- Specified by:
enableLogging
in classWorkflowContext
-