...
There are two ways to disable the emit Null column featureattribute:
Add the dbconnector.emitNullColumns=false property to the dbconnector properties file for your installation.
OR add the emitNullColumns="false" attribute to the respective element in the configuration.xml file for your installation:
For example:
...
Writing rules with http.post and http.put requests eliminates the need to use a Stored stored procedure to update/insert records into your database tables and then call that Stored Procedure from a business rule.
Stored Procedures
You can also execute stored procedures via the database connector. The Database Connector supports the use of Stored Procedures to update/insert data into a database table. Existing stored procedures can still be used. However, using the Post/Put to the Database Connector from a Business Rule accomplishes the same thing and is a more straight forward approach than using a stored procedure.
To use a stored procedure, you must:
- Create a stored procedure to update/insert the values into the database table
- Call this stored procedure in the <retrieve> tag of your configuration.xml query
- Use an http.get statement in your business rule to call this query. The stored procedure will execute and update/insert data into your table
Here is an example of a mySql stored procedure.
...
To call this from the mySql command line you would use the command: call GetNewOrderNum(); To call this from the database connector you would add the following to the configuration.xml:
Code Block |
---|
<query name="getOrderNumber">
<retrieve>
<statement> w
call GetNewOrderNum()
</statement>
</retrieve>
</query> |
...