Workflow - Lookup Rule Maintenance
Lookup rules are used within Oracle Workflow. CMiC has pre-defined functions that can be used within Workflow that use these lookup rules to retrieve data to be used within Workflow. Lookup rules can be used to retrieve users associated with specific functions, for example to retrieve the name of the project manager of a specific project using a specific key player role or to set an approval limit for vouchers.
General Steps in Using a Lookup Rule
-
In CMiC Enterprise, create the lookup rule – e.g. “Std Voucher Amt Threshold”.
-
In Workflow Builder, either copy an existing generic “Get Value From…” function from CMiC Standard into the required process or create a new process using one of the existing CMiC functions documented.
-
Open the Properties of the function in the process and on the Note Attributes tab, connect the function to existing item attributes in the current workflow.
Where it says <Enter WKF Resource Lookup Name Here> replace with the lookup name ‘Std Voucher Amt Threshold’ as defined in step 1.
Lookup rules are created on the Lookups By Type screen (standard Treeview path: Workflow > Setup > Resource Lookup Rules). This screen displays all active lookup rules.
Lookups By Type
Pgm: WKFLOOK – Lookups By Type; standard Treeview path: Workflow > Setup > Resource Lookup Rules
Show Inactive Lookups – Checkbox
Check this box to display inactive lookups.
[Copy Default Lookups] − Button
This button is only available on Cloud. CMiC maintains a standard list of Workflow lookups for Cloud in a central location. When CMiC make updates to Standard Cloud Workflows that require new/additional Workflow lookups, they get added to the central store and clicking the [Copy Default Lookups] button will copy any Workflow lookups that are missing into the tenant.
Active – Checkbox
The 'Active' checkbox is meant to hide inactive lookups when the workflow is launched. Check this box to make the lookup active. If the lookup is active and there is a value in the lookup at the time the workflow is launched, the workflow will be able to read the lookup.
Lookup Name
This is a user-defined name. This is the name that will be used within Workflow to link to a function to the data related to this lookup. The lookup name should describe what is to be retrieved given the input type.
NOTE: Making any change to a lookup name, input type or output type may break workflows that are using these lookups unless the workflow is also modified to match the lookup change.
Input Type
Enter/select the lookup input type. The input type selected here is used to determine the base data needed to be able to use the lookup.
The input type “None” is the equivalent of a system-wide lookup, where there is a predefined value required for a function.
Output Type
Enter/select the lookup output type. The output type selected here determines the output of the lookup. For example, there are predefined outputs such as “System Contacts”, “PM Roles”, “User-Defined Text”, etc.
[Values] – Button
This button opens a pop-up window where the actual values are now entered. For example, if the Input Type field is set to “PM Project” and the Output Type field is set to “PM Key Player Role”, the [Values] button opens a pop-up window where the input data is company and project and the output data is PM key player role.
Pop-up window launched from [Values] button on Lookups by Type screen
Users can customize the lookup according to company code and project. An asterisk (*) in a field is a wildcard. This is the same as using a “%” within SQL.
When a user inserts a new line, the [Duplicate Record] button can be used to duplicate the values from the line above it.
Perhaps in all companies starting with a “0”, the key player role to be used is “MNGR”, while in company ZZ, the key player role for project managers is “PM”.
If the Output Type field is set to “User-Defined Text”, then the user can enter any value required, as shown in the screenshot below.
Lookup Values – Text Type
NOTE: If “User-Defined Text” is selected as the output type in the Lookups By Type screen, then when the user launches the pop-up window from the [Values] button, the LOV for the Value field in the pop-up window would not be used since the user would be entering a user-defined value in the field.
Assigning Users to Lookup
Example of assigning users to a lookup
To assign users to a lookup, select the lookup, ensure the Output Type field is set to “Workflow User”, and click on the [Values] button.
All entries in the [Values] pop-up window need to have a unique Key 1 column value. For example, there should not be two entries where the Key 1 column value is “*”. There should only be one entry where the Key 1 column is “*”.
The Key 1 column value is a user-defined value if the Input Type field is set to “None”.
This screen is also used to reassign approvers, if required (e.g. if an employee who is an approver goes on leave or has left the company).
NOTE: It is recommended to only have one entry for the lookup because the workflow will randomly pick one of the entries if there are multiple.
Setting Compliance Email Notifications for Closed Projects/Jobs/Subcontracts
On the Lookups by Type screen, the scheduler can be set for email notifications if the compliance/insurance has already expired. Standard workflows related to compliances consider the Compliance Include Only Open Projects/Jobs/Subcontracts lookup and pass it as a parameter to send compliance expiry notices.
If the 'Active' box for this lookup is checked, it will allow users to stop receiving email notifications for a job/project/subcontract if it is closed. Conversely if it is unchecked, it will continue sending email notifications even if a job/project/subcontract is closed.
The following example is an email that is sent when the box is unchecked:
Output Type Values
The following table shows output type values available.
Output Type |
Values Available |
Values Available |
Values Available |
---|---|---|---|
GL Department |
Company Code |
Department Code |
|
JC Job |
Company Code |
Job Code |
|
PM Key Player Role |
PM Key Player Role |
|
|
PM Project |
Company Code |
Project Code |
|
PM Role |
PM Role |
|
|
PY Employee |
Employee Code |
|
|
User Defined Text |
Value |
|
|