Created
April 4, 2023 05:52
-
-
Save imtrinity94/1f6f00153e8c32e930a52ead5cf7218f to your computer and use it in GitHub Desktop.
get Workflow details inside vRO Script.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
System.log("TokenName: "+workflow.currentWorkflow.name); -> Workflow Name | |
System.log("TokenName: "+workflow.name); -> Token Name | |
System.log("WorkflowName: "+workflow.rootWorkflow.name); -> Workflow Name | |
var wfInstance = Server.getWorkflowWithId(workflow.currentWorkflow.id); | |
System.log(wfInstance.workflowCategory.path +"/"+wfInstance.name); -> Workflow Path/Workflow Name | |
System.log(System.currentWorkflowItem.itemName); undefined | |
System.log("WorkflowObject: "+wfInstance); -> Workflow type object | |
System.log("WorkflowFirstItem: "+wfInstance.firstitem); undefined | |
System.log("*** List of items in Workflow"); | |
for (var i = 0; i < wfInstance.items.length; i++) | |
System.log(wfInstance.items[i].name); // End, Scriptable Task, Start, Scriptable Task #2 | |
System.log("*** List of attributes in Workflow"); | |
for (var i = 0; i < wfInstance.executions.length; i++){ | |
if(i == 1){ | |
for (var i = 0; i < wfInstance.executions[i].attributesStack.length; i++){ | |
System.log(wfInstance.executions[i].attributesStack[i].name); undefined | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment