Interface ActivityContext

All Known Implementing Classes:
WorkflowRunContext

public interface ActivityContext
What a node outside execution (email, agent, message) may ask of the walk it runs in: who it runs as, what record it is about, the variables it may read and the cascade it belongs to. Nothing here moves the walk; an activity reports back through its step's outcome.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    How many turns deep in that chain this walk is; zero when nothing sent it here.
    The chain of message deliveries this walk belongs to, or null if nothing sent it here.
    The run this walk belongs to, or null before one has been written.
    The custom model, when model() is a custom record; else null.
    The entity class the run is about.
    The record the run is about, or null for a run with no record.
    That record's name, as a person would recognise it.
    renderTemplate(String stepId, String text)
    Render an authored template against this walk, for a node that carries prose.
    void
    Publish an activity's answer for the nodes after it to read by name.
    The process variables visible at this point, flattened.
    The definition's name, as authored.
    The definition's stable id.
  • Method Details

    • model

      String model()
      The entity class the run is about.
    • jsonModel

      String jsonModel()
      The custom model, when model() is a custom record; else null.
    • recordId

      Long recordId()
      The record the run is about, or null for a run with no record.
    • recordName

      String recordName()
      That record's name, as a person would recognise it.
    • workflowName

      String workflowName()
      The definition's name, as authored.
    • workflowXmlId

      String workflowXmlId()
      The definition's stable id.
    • currentRunId

      Long currentRunId()
      The run this walk belongs to, or null before one has been written.
    • vars

      Map<String,Object> vars()
      The process variables visible at this point, flattened.
    • renderTemplate

      String renderTemplate(String stepId, String text)
      Render an authored template against this walk, for a node that carries prose.
    • setAgentBinding

      void setAgentBinding(Map<String,Object> binding)
      Publish an activity's answer for the nodes after it to read by name.
    • cascadeId

      String cascadeId()
      The chain of message deliveries this walk belongs to, or null if nothing sent it here.
    • cascadeDepth

      int cascadeDepth()
      How many turns deep in that chain this walk is; zero when nothing sent it here.