Difference between revisions of "Troubleshooting Spell Code"

From SDU
Jump to: navigation, search
m
m
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
 +
[[Category:How To]]
 +
[[Category:r6]]
 +
[[Category:r11]]
 
{{Global Header}}
 
{{Global Header}}
 
{{Global Announcement}}
 
{{Global Announcement}}
  
 
== Overview ==
 
== Overview ==
Troubleshooting spell code always was such as a hell for me, ultil I meet bop_cmd.
+
Troubleshooting spell code always was such as a hell 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, loose time.
 
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.

Revision as of 05:37, 6 August 2008

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 hell 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, 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>