Class ApplicationContext
java.lang.Object
com.suncode.pwfl.workflow.WorkflowContext
com.suncode.pwfl.workflow.application.ApplicationContext
- All Implemented Interfaces:
Context
Application
Context
. Active during execution of application (automatic task).- Author:
- RafaĆ Nowacki 28 cze 2016
-
Field Summary
FieldsFields inherited from class com.suncode.pwfl.workflow.WorkflowContext
enableLog
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ApplicationContext
Activates application context.static void
activate
(String processId, String activityId, InContext<ApplicationContext> action) Activates application context and invokes provided action in created context.static ApplicationContext
current()
Returns current application contextstatic ApplicationContext
Deactivates current application contextvoid
void
static boolean
isActive()
Returns true if this context is active.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
-
ApplicationContext
-
-
Method Details
-
name
Description copied from interface:Context
Returns this context name (for identification purposes)- Specified by:
name
in interfaceContext
- Overrides:
name
in classWorkflowContext
-
isActive
public static boolean isActive()Returns true if this context is active. -
current
Returns current application context- Throws:
ContextNotActiveException
-
activate
Activates application context.- Parameters:
processId
- process idactivityId
- activity id- Returns:
- active application context
-
activate
public static void activate(String processId, String activityId, InContext<ApplicationContext> action) Activates application context and invokes provided action in created context.- Parameters:
processId
- process idactivityId
- activity idaction
- action executed in activated context
-
deactivate
Deactivates current application context- Returns:
- deactivated context
-
disableLogging
public void disableLogging()- Specified by:
disableLogging
in classWorkflowContext
-
enableLogging
public void enableLogging()- Specified by:
enableLogging
in classWorkflowContext
-