In some scenarios, you may need fulfilment of some criteria to create a case in Cora OpsManager. Or there may be a need to follow a process just before creation of a case. In such scenarios, the Pre case hook in Cora OpsManager allows the developer to add workflow even before the case is open. Approval cycle can be one such workflow.
These workflows are referred to as Pre Case Execution workflows. They can be blocking and may not allow creation of a case until a response is received from the workflow.
To create a workflow that holds the logic of the Pre Case Execution (all the activities that needs to be done before the case is open).
- On Admin console, go to Workflows > All workflows.
- Create a copy of ICM PreCaseRequest workflow without changing the Input and Output activities. In this copy, create all the activities that you need to perform before the case is created.
- On Admin console, go to Global Settings > Application Variable, and update these app variables:
- OPM.IsPreCaseRequestNeeded: Value 0 or 1 to determine whether Pre Case execution is needed or not.
- OPM.IsPreCaseBlocking: Value 0 or 1 to determine whether Pre Case execution workflow will block the case until a response is received (1) or not (0). In case it is blocking, the case is not created until a response is received from the workflow. In case it is non-blocking, the case is created, and the activities in the workflow are performed in the background.
Note:
You must use blocking, if your answer depends on decisions that will be made during the workflow.
- OPM.PreCaseWorkflow: the Pre Case workflow spaceguid.
While in pre case execution workflow, the case status is Pre Case Creation, and the case is visible in Operation Managers case list only. As the case is not created yet so, it cannot be fetched and worked upon by any operator, and will not be shown in any dashboard or report in Cora OpsManager.
In the end, this workflow will return the following two values:
- Result–Yes or No
- Comment–string
If the result is Yes, the case is created, a notification is added to the case conversation tab, and a record is added to the audit log.
If the result is No, the case is NOT created, and the status changes to Reject From PreCase.