POST Workflow Instances Instance ID Signals
The POST //Instances/{instanceId}/Signals method is used to input signals to the workflow instance with the specified GUID. This returns 204 with no content upon success.
Note: If a workflow instance is initiated for a workflow definition that has more than one step requiring input (signals), a user can only provide that input (e.g. approve or deny a require approval request) at the step in the workflow instance where the workflow instance was suspended pending input. The user cannot jump ahead and provide input for future steps in the workflow that have not yet occurred.
Note: A locking conflict may occur if two (or more) users attempt to provide input to a workflow instance (e.g. approve a request) at exactly the same time. If this happens, input from only one of the users will be reflected in the Management Portal, and the workflow instance will not be moved along to the next step if it should have been with input from the two users. The other input is still accepted, however, and there is a scheduled task that runs daily and attempts to continue all suspended workflows that may be eligible to continue but have not done so due to locking conflicts.
Tip: The following permissions (see
Security Overview) are required to use this feature:
The user executing the request must hold at least one security role ID configured in the workflow definition step for which signal data is being input.
Table 667: POST Workflow Instances {instanceid} Signals Input Parameters
instanceId |
Path |
Required. A string indicating the Keyfactor Command reference GUID of the workflow instance to which to input a signal.
Use the GET /Workflow/Instances method (see GET Workflow Instances) to retrieve a list of all the workflow instances to determine the GUID.
|
signal |
Body |
Required. An array containing the data used at the point in the workflow step where the workflow needs to continue based on user input. These will vary depending on the type of workflow and the type of step. Show RequireApproval signal details.
SignalKey |
Required. A string indicating the key for the signal. This is made up of the unique name for the step within the definition plus the signal type, separated by a period (UniqueName.SignalType). For a Require Approval step, the key input type will be ApprovalStatus, so the full SignalKey will look something like:
RequireApproval1.ApprovalStatus
Use the GET /Workflow/Definitions/{definitionid} method (see GET Workflow Definitions Definition ID) to return workflow details including the workflow steps to determine the UniqueName of the step for which you want to input a signal or one of the GET methods for workflow instances (see GET Workflow Instances, GET Workflow Instances AssignedToMe, or GET Workflow Instances My) to return the CurrentStepUniqueName.
|
Data |
Required. An array containing key/value pairs providing the input information for the signal. The key(s) will vary depending on the signal. Show RequireApproval signal data details.
Approved |
Required. A Boolean indicating whether the request is approved (true) or denied (false).
|
Comment |
A string containing a comment to associate with the signal. The maximum comment length is 500 characters.
|
|
For example, to approve a Require Approval step called RequireApproval1 with a comment: {
"SignalKey": "RequireApproval1.ApprovalStatus",
"Data": {
"Approved": "True",
"Comment": "Here is my comment."
}
}
|
Tip: For code examples, see the
Keyfactor API Endpoint Utility. To find the embedded web copy of this utility, click the help icon (
) at the top of the
Keyfactor Command Management Portal page next to the
Log Out button.