Administer > Administer Service Management > Studio > Approval definitions > Set up approval plan for a custom record type

Set up approval plan for a custom record type

For custom record types created using Studio, you can create approval definitions and enable approval plans in a workflow.

Create approval definitions

  1. From the main menu, select Administration > Configuration > Studio.

  2. Select a custom record type.
  3. Create an approval definition as described in How to build an approval definition.
  4. You can add more approval definitions to the custom record type.

Notes:

  • Approval definitions of a custom record type cannot be removed after being created. This behavior is identical to the behavior of the Change or Idea record type.
  • Approval definitions is not covered by the dev2prod process. This behavior is identical to the behavior of the Change or Idea record type.

How to enable/disable approval plan in a phase

  1. From the main menu, select Administration > Configuration > Studio.

  2. Select a custom record type.

  3. Click the Processes and Rules tab.
  4. Select a phase, click the Properties tab on the right panel.

  5. Select or deselect the Enable Approval Plan check box.

  6. Click Save.

  7. Click the Fields tab, if the Enable Approval Plan check box was selected, you will find that a field named TaskPlanFor<Phase>_<UniqueSuffix> is created for the phase on which you enabled the approval plan. For example, for a field named "TaskPlanForCustomPhase2_GJGFYU09Z,” “CustomPhase2” is the phase name, and “GJGFYU09Z” is a unique suffix generated by the system. If you deselected the Enable Approval Plan check box, the corresponding field will be removed. The TaskPlanFor<Phase>_<UniqueSuffix> field can be used in DSL expressions of workflow business rules. See Studio business rules for more information.

  8. If the approval plan is enabled in a phase, the phase cannot be moved to another metaphase. To move the phase to another metaphase, you will have to disable the approval plan and save.

How to select/deselect approval definition in a phase

If the Enable Approval Plan check box is selected for a phase, you can specify the approval definition to be used by the phase.

  1. From the main menu, select Administration > Configuration > Studio.

  2. Select a custom record type.

  3. Select a phase, click the Properties tab on the right panel.

  4. Select Approval Definition from the drop-down list or clear the field.

  5. Click Save.

See Approval definitions for more information.

How to use approval plan on a custom record instance

  1. Open a custom record instance from the customized menu. Select a record instance or create a new record instance, fill in the detail page.
  2. Click the Approvals tab on the left panel. This tab will not be displayed if no approval plan was enabled in any phase of the current record type.

  3. Tabs of phases that have approval plans are shown on the right panel.

  4. Approval pans will be shown if the phase has an approval definition. Otherwise, empty approval plan will be shown.

  5. You can edit the approval plan if no approval definition has been defined in the phase.

  6. Click Save.
  7. Customer can only view approval plan if there is approval definition defined in the phase.

  8. After the record instance enters the phase that has approval plan enabled, the approval plan will be triggered.

How to make sure the process does not enter the next phase until all approvals are finished successfully

As long as there are unfinished approvals, the process should not move on to the next phase. This can be achieved using workflow business rules. The following steps give an example of it, the steps may vary depending on your business case.

In this example, the bb phase has an approval plan. The display label is "bb," the name is "CustomPhase1."

  1. From the main menu, select Administration > Configuration > Studio.
  2. Select the custom record type, click the Processes and Rules tab.

  3. Select the transition after the phase that has approval plan enabled. In this example, select the transition after the bb phase.

  4. Click the Properties tab on the right side panel.
  5. Change transition type to Automatic.

  6. Enter the following DSL expression in Condition:

     ${entity.TaskPlanFor<Phasename>_<UniqueSuffix>.ExecutionPlanCompletionCode == 'Success'}

    In this example, TaskPlanFor<Phasename>_<UniqueSuffix> should be TaskPlanForCustomPhase2_GJGFYU09Z. You can also add other business conditions here.

  7. Save the workflow.

Create a new record and fill in the record's detail page. The next phase will be disabled until the approval plan is finished with the status "Success," and the process will automatically move on to the next phase when the approval plan is finished.

More information

  • Depending on the definition in the Studio, the Approvals tab may or may not be displayed on a record's detail page.
  • An approval plan shows up in a phase only when it was enabled for the phase in Studio.
  • When a record is created, everything on the Approvals tab of a record's detail page is copied from the approval definition of the record type. If you modify the approval definition of the record type, the changes will not affect the records that were created before. This behavior is identical to the behavior of the Change or Idea record type.