Share all details related to your problem, including any error messages you may have received.
Hi,
Not able to save BatchRequestItem ‘status’ and ‘result’ values in a Workflow step
We have a workflow which is invoked when a Batch Request is run in Sailpoint IIQ.
We see that once the batch request is executed, “result” is set as “Success” and “status” is set to “Finished”. This is weird because in the same Workflow code, we are setting the “message” value as well, and the “message” value is coming the same as what we are setting it to, using the workflow code.
We want to set the BatchRequestItem properties like result, status, message in a single piece of code. But our code is not able to save result and status attributes correctly. We are using OOTB Sailpoint APIs only. We have tried to run this code snippet using multiple ways :
Direct script
Rule
Method
Kindly help us with this as on compass community also, we are not able to find any relevant articles. Below is the code snippet which we are running in the workflow step.
Hi Satish,
PFA both the files.
No, this logic to save BatchRequestItem ‘status’ and ‘result’ is not working in any case, we have tried it in the custom workflow & as well as the Rule. But in both, the only attribute we can save for BatchRequestItem is the ‘message’. Both “result” is set as “Success” and “status” is set to “Finished” upon workflow completion.
Kindly let us know if you have any workaround for this.
What I suggest is to set trace variable in the workflow to true in order to track if workflow is correctly entering the step which should set BatchRequestItem status.
Hi Kamil, thanks
Can you please confirm if you ran it using the rule only?
I mean for a batchrequestitem, if I run a rule in debug page to update result/status then it will work and update result/status of batchrequestitem.
Our issue is that, when we do a batch request and the attached workflow runs, it references a rule (attached), which will run below code
batchRequestItem.setStatus(BatchRequestItem.Status.Terminated);
batchRequestItem.setMessage(“The Identity is inactive”);
batchRequestItem.setResult(BatchRequestItem.Result.Failed);
context.saveObject(batchRequestItem);
context.commitTransaction();
but this way, it is not saving Status and Result…only the Message value is getting saved for batchrequestitem…please advise
I doubt you can do this within the same workflow, setting the status.
If your requirement is to just update the Item status for tracking, may be you can try a workaround, as you already have the ID, call a workflow which will be scheduled may be after 5 min or so ( make this configurable) and within that workflow call your custom rule to update the status and Result of Batch Request Item.
Hope this works for you, if this doesn’t satisfy your requirement, let us know.