Difference between revisions of "Troubleshooting Spell Code"
(→Usage) |
(→Examples) |
||
| Line 19: | Line 19: | ||
* 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. | * 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. | ||
| − | + | <source lang="text"> | |
bop_cmd -s ''potato.spl'' ''chips(0, "priority", 0, 1 )'' | bop_cmd -s ''potato.spl'' ''chips(0, "priority", 0, 1 )'' | ||
| + | </source> | ||
Revision as of 21:39, 24 July 2008
Introduction
Troubleshooting spell code always was such as a hell for me, ultil 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, loose 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
<source lang="text"> bop_cmd -s spell file.spl spell_function in file(0, parameter1, parameter2, parameter3) </source>
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.
<source lang="text"> bop_cmd -s potato.spl chips(0, "priority", 0, 1 ) </source>