osworkflow / docs / Migrating from version 2.5.html

        <title>Migrating from version 2.5</title>
	    <link rel="stylesheet" href="styles/site.css" type="text/css" />

	    <table class="pagecontent" border="0" cellpadding="0" cellspacing="0" width="100%" bgcolor="#ffffff">
			    <td valign="top" class="pagebody">

				    <p class="paragraph">In order to migrate existing OSWorkflow 2.5 applications to OSWorkflow 2.6, the <b class="strong">WF_ENTRY</b> table must be modified. The <b class="strong">INITIALIZED</b> column type has changed from a boolean to an int. In some databases there is no difference between a boolean and an int, so no type change is necessary. In all cases, the column name must be changed to <b class="strong">STATE</b>.</p>If the column type needs to be changed, then the best approach is to create a new <b class="strong">STATE</b> column, and populate it with the values from the old <b class="strong">INITIALIZED</b> column. Old values of &#039;false&#039; map to a value to 0 in the new column, and values of &#039;true&#039; map to 1 in the new column. Once this new column has been successfully populated, the <b class="strong">INITIALIZED</b> column can be deleted.<p class="paragraph">The InternalWorkflowException and WorkflowException classes now wrap an Throwable, instead of an Exception. Recompilation is required.</p>The <b class="strong">doAction</b> method in Workflow can now throw a new runtime exception, <b class="strong">InvalidActionException</b>. This exception is thrown if the passed in action is invalid for the workflow.<p class="paragraph">Previously when an error was encountered in a bsh script, the bsh exception was wrapped in a <b class="strong">WorkflowException</b> and thrown. This behaviour is now modified so that the <b class="strong">WorkflowException</b> instead wraps the underlying cause of the error in the bsh script.</p>Due to popular demand, all the read methods in <b class="strong">Workflow</b> now no longer throw exceptions. Instead an appropriate &#039;blank&#039; value is returned. The exception is now just logged, rather than propagated. Methods which make changes in the store still throw exceptions back up, if an error occured.