TMACUL

http://www.servicedeskusers.com/Troubleshooting_Spell_Code"

Blog Post created by TMACUL Champion on Jan 1, 2016

Troubleshooting Spell Code

 

From SDU

Jump to: navigation, search

 

To make corrections or additions to this article, select the edit tab above.
To discuss or ask questions about this article, select the discussion tab above.


 

Overview

Troubleshooting spell code always was such as a **** for me, until I meet bop_cmd.

Every once in a while we need to test some kind of structure, logic or even code and we always forget a semicolon, a curly bracket and BANG Service Desk crashes and we need to debug, restart, copy code and of course, lose time.

With bop_cmd we can run spell code with little or no impact in Service Desk.

Of course, to run a spell file, we need the pdm_daemon_manager service to be running.

Usage

bop_cmd -s spell file.spl  "spell_function in file(0, parameter1, parameter2, parameter3)"

To simulate the triggering event such as Service Desk does, always send to the function a first parameter 0 (which I do not know what it is, but trust me, you need to do this), the name of the property described in the mod file, and two values, one representing the value before the trigger was fired, and one after.

Examples

  • In this example, we start a spell function named chips in a spell file named potato.spl, simulating the priority change from 0 to 1.
bop_cmd -s potato.spl "chips(0, 'priority', 0, 1 )"

Retrieved from "http://www.servicedeskusers.com/Troubleshooting_Spell_Code"

Outcomes