Customize Status code LaunchedWorflow

Which IIQ version are you inquiring about?

[8.3]

Share all details about your problem, including any error messages you may have received.

Hello,

We are using SCIM LaunchedWorkflow to launch a specific workflow. We are doing a specific processing to detect errors, as we return a special comment when there is an error.
Our need is: is it possible to set a specific error code on LaunchedWorkflow, as right now it returns only 201 when the workflow is executed? for example setting 404

Best regards

I don’t think you can change that code, but you can get creative with responses if you do get a 201.

In the workflow, create a variable and set the output=true

<Variable name="responseCode" output="true"/>
<Variable name="responseMessage" output="true"/>

Then later in your workflow, you can pass back your workflow by setting a value:

// Do some logic
workflow.put("responseCode", "404");
workflow.put("responseMessage", "My custom message");

That should be in the json payload response back from your SCIM call.