Class AcceptanceContext

java.lang.Object
com.suncode.pwfl.workflow.WorkflowContext
com.suncode.pwfl.workflow.AcceptanceContext
All Implemented Interfaces:
Context

@Api public class AcceptanceContext extends WorkflowContext
Acceptance Context. Active during acceptance of an activity (started by user).
Author:
RafaƂ Nowacki 13 cze 2016
  • Field Details

  • Constructor Details

    • AcceptanceContext

      protected AcceptanceContext(String processId, String activityId, String actionName)
  • Method Details

    • name

      public String name()
      Description copied from interface: Context
      Returns this context name (for identification purposes)
      Specified by:
      name in interface Context
      Overrides:
      name in class WorkflowContext
    • getActionName

      public String 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

      public static AcceptanceContext current() throws ContextNotActiveException
      Returns current acceptance context;
      Throws:
      ContextNotActiveException
    • activate

      public static AcceptanceContext activate(String processId, String activityId, String actionName)
      Activates acceptance context.
      Parameters:
      processId - process id
      activityId - activity id
      actionName - 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 id
      activityId - activity id
      actionName - action name
      action - action executed in activated context
    • deactivate

      public static AcceptanceContext deactivate()
      Deactivates current acceptance context
      Returns:
      deactivated context
    • disableLogging

      public void disableLogging()
      Specified by:
      disableLogging in class WorkflowContext
    • enableLogging

      public void enableLogging()
      Specified by:
      enableLogging in class WorkflowContext