Identifying Workflow Definitions Used by Records
Service Board supports the use of multiple workflow definitions for a single workflow. This can make it difficult to know which workflow definitions are used by specific records and how many records use a specific workflow definition, which can complicate migration from previous definitions to current versions. To easily see this information, you can configure a field in the object for whose records you want to identify workflow definitions.
To identify workflow definitions used by records:
1. In Max Designer, on the Developer Tools () launchpad menu, click Object Designer, and then in the left pane, search for and select the object for which you want to view workflow definition usage, for example, Showcase.
2. In the left pane, click Fields, and then in the right pane, in the list view, in the top left corner, click Create ().
3. In the right pane, complete the fields as follows, and then click Save.
Field
Value
Name
The name for the field, for example, Showcase Workflow Definition.
Identifier
Auto-populates based on what you enter in the Name field.
Namespace
The environment for your Service Board tenant.
Application
The application for which you are configuring this field, for example, Max.
Datatype
Relationship
Short Description
A brief phrase that identifies how the field is used, for example, Used by Showcase.
Relationship Type
Referential
Target Object
Workflow Definition
4. In the right pane, in the Fields list, open the newly created field, and then in the top left corner, click More Details ().
5. On the record page, on the Overview tab, select the Calculated check box, and then on the Code tab, in the Custom Code field, configure the following Groovy code:
io_showcase_workflow.getWorkflowDefinition().getID()
* 
In the preceding code sample, io_showcase_workflow is the full identifier of the Workflow field of the Showcase object.
6. On the System Info tab, clear the Custodian Reserved check box, and then in the top left corner, click Save and Close ().
7. In Max Designer, on the Development Actions () launchpad menu, click Synchronize, and then if needed, to trigger the newly configured logic on all existing records to which the newly created field is added, in Object Designer, navigate to the field and in the right pane, click Recalculate Field Value.
8. In Form Designer, add the newly created field to the form for the related object, and then to view details of the workflow definitions used by specific records, do one of the following:
Open any record of the object to view the value of the newly created field, which shows the related workflow definition.
Open any workflow definition record and check the list in the Relations tab to see how many records of each related objects use the workflow definition.
For more information:
Was this helpful?