Skip to main content
Skip table of contents

UC Running Workflows

Motivation

Users wishing to start a particular workflow instance can do so via the call under the SWAGGER Reference. However, it is important for the user attempting to perform the call that both the intended workflow's workflowName and workflowVersion be known.

For workflow version, also ‘latest’ can be used.

It is also possible to provide a username to run the workflow as the defined user.

Description

Performing the POST call starts a new instance of the workflow, while also returning the id for that particular workflow as workflowId. The parameters for the workflow are available in the respective SWAGGER Reference section below.

Based on the contract, some parameters can be optional. If the optional parameters are not supplied at the time of the call, their stored default value is used.

If the workflow was created successfully, the response will be a 201 Created. The payload contains the workflowId which can be used to monitor the workflow.

Reference

http://host/Platform.Core/Workflow/swagger/index.html

Example

POST /v1/Instances/workflowName/workflowVersion

POST /v1/Instances/AwesomeWorkflow/1.0

JSON
{
  "Id": "65353d3c-42df-4144-8253-5b2bcee69603",
  "WorkflowName": "AwesomeWorkflow",
  "WorkflowVersion": "1.0",
  "WorkflowId": "1c2ae8eb-d79a-414b-beaf-81e4f9a901a1",
  "StartTime": "2025-03-12T13:54:34.2256807+00:00",
  "EndTime": "2025-03-12T13:59:34.2256775+00:00",
  "StartedBy": "WorkflowUser",
  "State": "Completed",
  "Progress": 0,
  "Description": "Some Description",
  "Data": {
    "InputParameters": [
      {
        "Name": "IdleTime",
        "Value": "5",
        "Type": "long"
      },
      {
        "Name": "SomeStringInput",
        "Value": "Some string...",
        "Type": "string"
      }
    ],
    "OutputParameters": [
      {
        "Name": "SomeStringOutput",
        "Value": "Some string as the result of the workflow...",
        "Type": "string"
      }
    ]
  },
  "IsInvalid": false,
  "Priority": 0,
  "Metadata": {
    "CustomField": "CustomFieldValue"
  },
  "HasChildren": false,
  "ProcessCorrelationId": "e63e26f6-e4c6-4b48-9533-12859b3c4d0f",
  "RestartRelation": "NotRestarted"
}

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.