This task connects to the database using an External Resource of type SQL which you must configure before running this task.
To manage the DB schema of a Process Execution Engine, use task <engine> instead.
To manage the DB schema of a BPM Direectory, use task <directoryschema> instead.
Example usage:
<fuego:database action="create"
connectorName="oracleConnector"
file="/tmp/schema.xml"
userProperty="user"
passwordProperty="password"/>
Example DB schema definition XML file:
<Schema>
<table name="table1" locking="row">
<field name="intCol" type="INTEGER" notnull="true"/>
<field name="decCol" type="DECIMAL" size="8, 0" notnull="true"/>
<field name="strCol" type="STRING" size="50" notnull="true"/>
<field name="timeCol" type="TIMESTAMP"/>
<field name="binaryCol" type="BINARY"/>
<field name="boolCol" type="BOOLEAN" notnull="true"/>
<primarykey fields="intCol"/>
</table>
<table name="table2">
<field name="intCol" type="INTEGER" notnull="true"/>
<field name="decCol" type="DECIMAL" size="8, 0" notnull="true"/>
<primarykey fields="intCol"/>
</table>
<procedure name="procWithOut">
<code>
<![CDATA[BEGIN RETURN;]]>
</code>
</procedure>
<procedure name="procIn">
<argument name="argin" argtype="in" type="STRING"/>
<code>
<![CDATA[BEGIN RETURN;]]>
</code>
</procedure>
<procedure name="procOut">
<argument name="argout" argtype="out" type="STRING"/>
<code>
<![CDATA[BEGIN argout := 'OUT'; RETURN;]]>
</code>
</procedure>
<procedure name="procInOut">
<argument name="argio" argtype="in/out" type="STRING"/>
<code>
<![CDATA[BEGIN argio := argio||'OUT'; RETURN;]]>
</code>
</procedure>
<sequence name="testSequence"></sequence>
</Schema>
| Attribute | Description | Type | Required? |
| haltonerror | Stop the Ant build process if an error occurs. | boolean | No Defaults to true. |
| userproperty | Sets the configuration's property key for the user name. | String | Yes |
| file | Sets the location of an xml file containing the configuration's definitions. | File | Yes |
| passwordproperty | Sets the configuration's property key for the password. | String | Yes |
| verbose | Verbose output. | boolean | No Default is false |
| action |
Defines the operation to execute:
|
String ["create", "drop", "clean"] | Yes |
| schemafile | Sets the file location of the xml schema definition. | File | Yes |
| user | Sets the user to connect to the database. | String | No Defaults to null |
| connectorname | Defines the name of the SQL database configuration. | String | Yes |
| fuegobasedir | Path to BPM Enterprise installation directory. | File |
No Defaults to value of fuego.basedir property of your
Ant script.
|
| loaderref | Reference to BPM classloader. Used internally. | Reference | No |
| password | Sets the user's password to connect to the database. | String | No Defaults to null |