{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":1123,"path":"api-reference/server-api-reference/c_WalkWorkflowAPI.md","title":"WalkWorkflow - Global","bundle":null,"doc_type":null,"release":"australia","body":"\n# WalkWorkflow- Global\n\nThe 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.\n\n**Parent Topic:**[Server API reference](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/server-api-reference/api-server.md)\n\n## Walkworkflow - Walkworkflow\\(GlideRecord workflowVersion\\)\n\nConstructor for **Walkworkflow** class.\n\n|Name|Type|Description|\n|----|----|-----------|\n|workflowVersion|GlideRecord|GlideRecord on table wf\\_workflow\\_version of the workflow version to analyze.|\n\n|Type|Description|\n|----|-----------|\n|Workflow|Workflow object just created.|\n\n## Walkworkflow - computeFullSequences\\(\\)\n\nComputes the full sequence for every path.\n\nDoes not combine paths at Join activities. After calling this method, call getSequences\\(\\) to yield the computed sequences.\n\n|Name|Type|Description|\n|----|----|-----------|\n|None| | |\n\n|Type|Description|\n|----|-----------|\n|void| |\n\n## Walkworkflow - computeSequences\\(\\)\n\nComputes the sequences of activities.\n\nAll 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.\n\n|Name|Type|Description|\n|----|----|-----------|\n|None| | |\n\n|Type|Description|\n|----|-----------|\n|void| |\n\n## Walkworkflow - dump\\(\\)\n\nOutputs the internal state of this class to gs.print\\(\\).\n\n|Name|Type|Description|\n|----|----|-----------|\n|None| | |\n\n|Type|Description|\n|----|-----------|\n|void| |\n\n## Walkworkflow - dumpSequences\\(\\)\n\nOutputs the sequences internal to this class to gs.print\\(\\).\n\n|Name|Type|Description|\n|----|----|-----------|\n|None| | |\n\n|Type|Description|\n|----|-----------|\n|void| |\n\n## Walkworkflow - dumpShortestPathOrders\\( description\\)\n\nOutputs the shortest path orders internal to this object to gs.print\\(\\).\n\n|Name|Type|Description|\n|----|----|-----------|\n|None| | |\n\n|Type|Description|\n|----|-----------|\n|void| |\n\n## Walkworkflow - getActivitiesAtOrder\\(Number order\\)\n\nReturns all the activities at the specified shortest path order.\n\n|Name|Type|Description|\n|----|----|-----------|\n|order|Number|The order number the client is interested in.|\n\n|Type|Description|\n|----|-----------|\n|String Array|An array of activity sys\\_ids at the specified order. If an empty array is returned, there are no more activities.|\n\n## Walkworkflow - getSequences\\( \\)\n\nReturns the activity sequences.\n\nThe walk\\(\\) method must have been called prior to calling this method.\n\n|Name|Type|Description|\n|----|----|-----------|\n|None| | |\n\n|Type|Description|\n|----|-----------|\n|String|A string of \\|-delimited sequences. Each sequence is a comma-delimited list of activity ids \\(table wf\\_workflow\\_activity\\).|\n\n## Walkworkflow - walk\\(Boolean fullSequences\\)\n\nWalks the workflow and sets up the activity shortest path ordering.\n\nAfter calling this method the client would call the various accessor methods to obtain relevant data about the workflow.\n\n|Name|Type|Description|\n|----|----|-----------|\n|fullSequences|Boolean|\\(Optional\\) If **true**, computes the full sequences. Default is false.|\n\n|Type|Description|\n|----|-----------|\n|void| |\n\n"}}