Package

com.bazaarvoice.sswf

service

Permalink

package service

Visibility
  1. Public
  2. All

Type Members

  1. class StepActionWorker[SSWFInput, StepEnum <: Enum[StepEnum] with WorkflowStep] extends AnyRef

    Permalink

    The worker class responsible for executing workflow steps.

    The worker class responsible for executing workflow steps. The class is built so that you can plug it in to a scheduled service of your choice. First, call pollForWork() to determine if a step needs to be executed, and then call doWork() to execute the step. The actual logic for the step is provided by your WorkflowDefinition#act().
    You could obviously poll and work in the same thread, but remember that this worker can handle many concurrent workflows, so separating them lets you have one thread polling and then a pool of threads simultaneously working on actions.
    Example: runOne() { task := worker.pollForWork() if (task != null) { threadPool.submit(() -> { worker.doWork(task) }) }

    SSWFInput

    The type of the parsed workflow input

    StepEnum

    The enum containing workflow step definitions

  2. class StepDecisionWorker[SSWFInput, StepEnum <: Enum[StepEnum] with WorkflowStep] extends AnyRef

    Permalink

    The worker class responsible for scheduling workflow actions.

    The worker class responsible for scheduling workflow actions. The class is built so that you can plug it in to a scheduled service of your choice. First, call pollForDecisionToMake() to determine if a decision needs to be made, and then call makeDecision() to make the decision.
    You could obviously poll and work in the same thread, but remember that this worker can handle many concurrent workflows, so separating them lets you have one thread polling and then a pool of threads simultaneously working on scheduling decisions.
    Example: runOne() { task := worker.pollForDecisionToMake() if (task != null) { threadPool.submit(() -> { worker.makeDecision(task) }) }

    SSWFInput

    The type of the parsed workflow input

    StepEnum

    The enum containing workflow step definitions

  3. class WorkflowManagement[SSWFInput, StepEnum <: Enum[StepEnum] with WorkflowStep] extends AnyRef

    Permalink

    This is where you register and start workflows.

    This is where you register and start workflows.
    In SWF, there are domains, workflow types, activities that need to be registered. You provide all the config we need for activities in the StepEnum. You give the parameters for domain and workflow type here.
    This class is implemented so that you can call registerWorkflow() every time your app starts, and we will register anything that needs to be registered, so you should be able to manage your whole workflow from this library.

    StepEnum

    The enum containing workflow step definitions

Value Members

  1. object util

    Permalink

Ungrouped