I'm building a PAM process (triggered by a Service Catalog request) to automate a PowerShell script on a server.
If the script fails, I use a SOAP operator to add a note to the Service Catalog Request, then another SOAP operator to change the status of the request to "cancelled".
By default, whenever a Service Catalog request is cancelled, any associated PAM process is immediately aborted. Because of this, my PAM process ends up getting aborted before it completes. I believe this default behavior is controlled by an out-of-the-box event-rule-action. I want to edit the rule so that it excludes this particular service. These docs say that the name of the rule is When Status Is Cancelled. However, I cannot find any such rule. Has the name of it changed? Does anyone know what rule is controlling this behavior? Thank you very much!
Hi Michael. Since I do not se any reference to the running release, I assume it is for 17.1.For 'Cancelled' the status-code is 4. In the mdb database I recognize the following:FROM [dbo].[usm_rule_condition] where condition like '%status = 4%'REQUEST_CANCEL_WARNING status = 4 AND status_old <> status usm_system_change_detail REQUEST_CANCEL_WARNING FROM [mdb].[dbo].[usm_rule] where rule_id = 'REQUEST_CANCEL_WARNING'rule_id status display_name description is_hidden is_system event_type_id type sub_type start_time expire_time When Status is Canceled for a Request Rule with filter that fires once for each request item when Status goes to Canceled Then searching in SC/admin/Events-Rules-Actions for ' When Status is Canceled for a Request', I found:Home > Administration > Events-Rules-Actions > Request ChangeRule list: When Status is Canceled for a Request I hope this will get you further on this?Thanks and kind regards, Louis.
Thank you for your help!
This is a logical catch-22 situation. If a Request is cancelled then you want the PAM process instances associated with the Request to be aborted. However, you don't want a PAM process instance to be aborted if that process instance was the thing that cancelled the Request.
How I have approached this was to create a Process definition that I can call with the Start Process operator in detached mode. The new Process definition would start with a Delay operator (say 5 seconds) and then the necessary SOAP call operators to update the Request (based on data passed by the calling process). Since the sub-process is called in Detached mode then the parent process would continue to its normal end.
ah that makes sense. Thank you!