Workflow integration commands reference

You can integrate workflow files with IBM RPA scripts. The workflow file defines the script's control flow, and the script defines the workflow tasks' logic.

When you integrate a workflow with a script, the workflow tasks define the control flow of your script. In the script, you need to:

  • Load the workflow to the script.
  • Bind workflow process variables to the script's variables, if needed.
  • Map workflow tasks to the script's subroutines.
  • Either create instances or run instances or both.

You should use the following commands to integrate a workflow into a script:

Load Workflow (loadworkflow)
Links the workflow process to the script creating a workflow variable.

Map Workflow Activities (mapWorkflowActivities)
Links workflow tasks to script subroutines manually.

Bind Process Variables (bindProcessVariables)
Links workflow variables to script variables with the same type manually.

Working with workflow instances

Create Workflow Instance (createWorkflowInstance)
Creates a workflow instance. You can assign the instance to an existing batch or define default values to the instance.

Execute Workflow Instance (executeWorkflow)
Executes a workflow instance.

List Workflow Instances (listWorkflowInstances)
Lists all the workflow instances filtering by their status. You can add more filters to the list.

Get the Next Workflow Instance (getNextWorkflowInstance)
Gets the next workflow instance that corresponds to the status you specify.

Working with batches

A batch is a workflow instance group used to manage and organize workflows with multiple instances and flows.

You should use the following commands to use a batch in the script:

Create Batch (createBatch)
Creates the batch. You can assign a workflow instances list or define default variables values to the batch.

Start Batch (beginBatch)
Starts the batch structure. You can assign default values to variables.

Update Batch (updateBatch)
Updates the batch configuration. You can define new descriptions and define new default values to the batch.