Class

com.bazaarvoice.sswf.service

WorkflowManagement

Related Doc: package service

Permalink

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

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

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. WorkflowManagement
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Instance Constructors

  1. new WorkflowManagement(domain: String, workflow: String, workflowVersion: String, taskList: String, swf: AmazonSimpleWorkflow, workflowExecutionTimeoutSeconds: Int = 60 * 60 * 24 * 30, workflowExecutionRetentionPeriodDays: Int = 30, stepScheduleToStartTimeoutSeconds: Int = 60 * 5, inputParser: InputParser[SSWFInput])(implicit arg0: ClassTag[StepEnum])

    Permalink

    domain

    The domain of the workflow: AWS docs as well as the README

    workflow

    The id of your particular workflow. See "WorkflowType" in the AWS docs as well as the README.

    workflowVersion

    You can version workflows, although it's not clear what purpose that serves. Advice: just think of this as an administrative notation. See the README.

    taskList

    If you execute the same workflow in different environments, use different task lists. Think of them as independent sets of actors working on the same logical workflow, but in different contexts (like production/qa/development/your machine). AWS docs as well as the README

    swf

    The AWS SWF client

    workflowExecutionTimeoutSeconds

    How long to let the entire workflow run. This only comes in to play if 1) The decision threads die or 2) A step gets into an "infinite loop" in which it always returns InProgress without making any actual progress. The default is set to one month on the assumption that you'll monitor the workflow and fix either of those problems if they occur, letting the workflow resume and complete. If you prefer to let the workflow fail, you'll want to set it lower.

    workflowExecutionRetentionPeriodDays

    How long to keep _completed_ workflow information. Default: one month.

    stepScheduleToStartTimeoutSeconds

    The duration you expect to pass _after_ a task is scheduled, and _before_ an actionWorker picks it up. If there is always a free actionWorker, this is just the polling interval for actions to execute. If all the actionWorkers are busy, though, the action may time out waiting to start. This isn't harmful, though, since the decisionWorker will simply re-schedule it. Advice: make your actionWorker pool large enough that all scheduled work can execute immediately, and set this timeout to the polling interval for action work. Default: 60s

    inputParser

    See InputParser

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def cancelWorkflowExecution(workflowId: String, runId: String): Unit

    Permalink
  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. def describeExecution(workflowId: String, runId: String): StepsHistory[SSWFInput, StepEnum]

    Permalink

    List all the events from an execution of a workflow.

    List all the events from an execution of a workflow.

    workflowId

    The particular workflow id to list events for

    runId

    The particular run of the workflow id to list events for

  8. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  9. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  10. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. def generateSignal(workflowId: String, runId: String): String

    Permalink

    Use this method to generate signals for use with the Wait result

    Use this method to generate signals for use with the Wait result

    The format of the signal is publicly documented as 3 pipe-delimited fields with workflowId,runId, and a unique signal name.

    returns

    a signal token for passing to Wait and for calling signalWorkflow with.

  12. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  13. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  14. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  15. def listExecutions(from: Date, to: Date, workflowId: String): List[WorkflowExecutionInfo]

    Permalink

    List all the executions for this domain, workflow, and workflowId within the time window.

    List all the executions for this domain, workflow, and workflowId within the time window. (regardless of version)

    from

    Start time to search

    to

    End time to search

    workflowId

    The particular workflow id to list executions for

    returns

    an unmodifiable list of matching executions

  16. def listExecutions(from: Date, to: Date): List[WorkflowExecutionInfo]

    Permalink

    List all the executions for this domain and workflow within the time window.

    List all the executions for this domain and workflow within the time window. (regardless of version)

    from

    Start time to search

    to

    End time to search

    returns

    an unmodifiable list of matching executions

  17. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  18. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  19. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  20. def registerWorkflow(): Unit

    Permalink

    Register the domain,workflow,and activities if they are not already registered.

    Register the domain,workflow,and activities if they are not already registered. If you have marked any of these as DEPRECATED through the SWF api, this method will throw an exception telling you to delete the relevant config first.

  21. def signalWorkflow(signal: String): Unit

    Permalink

    Use this method to send a previously generated signal to the workflow that generated it.

  22. def startWorkflow(workflowId: String, input: SSWFInput): WorkflowExecution

    Permalink

    Submit/start a workflow execution.

    Submit/start a workflow execution.

    workflowId

    A unique identifier for this particular workflow execution

    input

    Whatever input you need to provide to the workflow

    returns

    tracking information for the workflow

  23. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  24. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  25. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  26. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  27. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped