Map Workflow Activities
Verb: mapWorkflowActivities
Maps Workflow activities, which are executed in subroutines and returns the ID of the workflow instances, assigning them the appropriate values in the current execution context.
Workflow is a process flow control engine. A Workflow represents a process within a BPMN file.
Syntax
mapWorkflowActivities --workflow(Workflow) --mappings(String)
Inputs
Script | Designer | Required | AcceptedTypes | Description |
---|---|---|---|---|
--workflow | Workflow | Required | Workflow | Variable of type "Workflow" in which the subroutines and activities will be mapped.
This variable is generated through the Workflow parameter of the Load Workflow command. |
--mappings | Mappings | Required | Text | Workflow instance and values that should be mapped:
1. The information defined in this parameter overrides what was obtained from the Automatically Map Subroutines and Automatically Map Variables parameters in the Load Workflow command. 2. If the Automatically Map Subroutines and Automatically Map Variables parameter of the Load Workflow command are not enabled, it will be necessary to use this parameter so that the subroutines and activities are recognized in the Workflow within the current context. |
Example
The Map Workflow Activities command maps the activity of the BPMN file relating it to the subroutine "beginSubroutine" and returns the mapped Workflow ID.
defVar --name mappedWorkflow --type Workflow
defVar --name a --type Numeric --value 1
defVar --name workflow --type Workflow
// Download the following file to run the command.
loadWorkflow --isfromfile --file "bpmnTestVar.bpmn" --process "Process 1" workflow=value
// Maps the Workflow task by relating it to the subroutine beginSubroutine
mapWorkflowActivities --workflow ${workflow} --mappings "Task_inc=beginSubroutine" mappedWorkflow=value
logMessage --message "${workflow}" --type "Info"
beginSub --name beginSubroutine
incrementVar --number ${a}
endSub
Download File
To run the sample script, it is necessary to download the file and inform its path in the File parameter of the Load Workflow command.