WalkWorkflow - Global

  • 릴리스 버전: Australia
  • 업데이트 날짜 2026년 03월 12일
  • 소요 시간: 4분
  • The WalkWorkflow script include provides methods to walk a workflow and return a list of successors for each activity along with a shortest path order that indicates the activity depth in the workflow.

    Walkworkflow - Walkworkflow(GlideRecord workflowVersion)

    Constructor for Walkworkflow class.

    표 1. Parameters
    Name Type Description
    workflowVersion GlideRecord GlideRecord on table wf_workflow_version of the workflow version to analyze.
    표 2. Returns
    Type Description
    Workflow Workflow object just created.

    Walkworkflow - computeFullSequences()

    Computes the full sequence for every path.

    Does not combine paths at Join activities. After calling this method, call getSequences() to yield the computed sequences.

    표 3. Parameters
    Name Type Description
    None
    표 4. Returns
    Type Description
    void

    Walkworkflow - computeSequences()

    Computes the sequences of activities.

    All sequences leading up to a join end at the join and then a single sequence from the join is computed. This ensures that all sequences can be walked up to a join, and then the sequence can be walked from the join. After calling this method a call to getSequences() will yield the computed sequences.

    표 5. Parameters
    Name Type Description
    None
    표 6. Returns
    Type Description
    void

    Walkworkflow - dump()

    Outputs the internal state of this class to gs.print().

    표 7. Parameters
    Name Type Description
    None
    표 8. Returns
    Type Description
    void

    Walkworkflow - dumpSequences()

    Outputs the sequences internal to this class to gs.print().

    표 9. Parameters
    Name Type Description
    None
    표 10. Returns
    Type Description
    void

    Walkworkflow - dumpShortestPathOrders( description)

    Outputs the shortest path orders internal to this object to gs.print().

    표 11. Parameters
    Name Type Description
    None
    표 12. Returns
    Type Description
    void

    Walkworkflow - getActivitiesAtOrder(Number order)

    Returns all the activities at the specified shortest path order.

    표 13. Parameters
    Name Type Description
    order Number The order number the client is interested in.
    표 14. Returns
    Type Description
    String Array An array of activity sys_ids at the specified order. If an empty array is returned, there are no more activities.

    Walkworkflow - getSequences( )

    Returns the activity sequences.

    The walk() method must have been called prior to calling this method.

    표 15. Parameters
    Name Type Description
    None
    표 16. Returns
    Type Description
    String A string of |-delimited sequences. Each sequence is a comma-delimited list of activity ids (table wf_workflow_activity).

    Walkworkflow - walk(Boolean fullSequences)

    Walks the workflow and sets up the activity shortest path ordering.

    After calling this method the client would call the various accessor methods to obtain relevant data about the workflow.

    표 17. Parameters
    Name Type Description
    fullSequences Boolean (Optional) If true, computes the full sequences. Default is false.
    표 18. Returns
    Type Description
    void