- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-06-2017 08:48 PM
Hi Everyone
Can some one please explain how this manual condition is working and what this condition is verifying.
This has been used in state flows
new sn_sm.SMConfiguration().isEnabled(current, "request_driven", false) && (new SMTask()).isAssigned(current)
thanks in advance.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2017 01:32 AM
Hi Raviteja,
The condition is in two parts.
The first part sn_sm.SMConfiguration().isEnabled(current, "request_driven", false) is creating a new instance of the sn_sm.SMConfiguration class and calling the isEnabled() function. The sn_sm.SMConfiguration class is unfortunately hidden, however I've been able to determine that the isEnabled function is checking the configuration settings of one or more applications listed in the sm_config table. In this case, it's checking the setting of the "request_driven" True/False flag for the application type of the current Service Management (SM) record.
The second part SMTask()).isAssigned(current) is simply calling the isAssigned function in the SMTask script include, which returns true if the Assigned To field is not empty in the passed current record, and false if the field is empty.
I hope that this helps.
Regards,
Dean.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-07-2017 01:55 AM
Hi Ravi,
In both part of the condition a new instance of the class (script include) is being created and passing some parameters to function. Based on the parameter function return true or false.
Hope this helps.
Regards
Ujjawal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2017 01:32 AM
Hi Raviteja,
The condition is in two parts.
The first part sn_sm.SMConfiguration().isEnabled(current, "request_driven", false) is creating a new instance of the sn_sm.SMConfiguration class and calling the isEnabled() function. The sn_sm.SMConfiguration class is unfortunately hidden, however I've been able to determine that the isEnabled function is checking the configuration settings of one or more applications listed in the sm_config table. In this case, it's checking the setting of the "request_driven" True/False flag for the application type of the current Service Management (SM) record.
The second part SMTask()).isAssigned(current) is simply calling the isAssigned function in the SMTask script include, which returns true if the Assigned To field is not empty in the passed current record, and false if the field is empty.
I hope that this helps.
Regards,
Dean.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-05-2019 08:09 PM
Great information. Yet I'm still not clear on what the false (third parameter) refers to in the command or how it's utilized sn_sm.SMConfiguration().isEnabled(current, "request_driven", false)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2019 06:27 PM
Hi MarkyMark,
I'm pretty sure (but can't 100% confirm) that the third parameter in sn_sm.SMConfiguration().isEnabled(current, "request_driven", false) is the default value to return if a SM Configuration record for the passed current record type is not found.
For example, if you were using the HR modules in your instance there should be an SM Config for the HR application, and if current is a HR Case it would return true (assuming that HR is set up to be a Request Driven Process).
However, if current is an Incident record, and there shouldn't be a SM Config entry for Incident, so it will return the third parameter (false in this example) as the default.
I hope this helps.
Dean.