Business Logic


For more advanced functionality that involved making complex decisions based on data, or running calculation-processes on data, you may want to create an action.

These actions usually appear as tasks in your WorkflowFirst application:

But they can also be used to handle events, run as periodic scheduled jobs, be used to generate the data to display in a report or to control the layout of a screen.

There are two kinds of actions that can be created in WorkflowFirst: Scripts and Plug-ins.

Scripts can be created from within the web browser, and are written using the DbfScript language. Plug-ins allow you to create actions using a third-party .Net compatible language such as C#. Ultimately, both of them are used in the same way.

Whereas DbfScript allows you to create relatively short procedure very quickly, the plug-in code allows you to use more sophisticated development tools such as Microsoft Visual Studio to create your actions. These benefits from having integrated debuggers which make it easier to track down problems, and also allow you to use third-party tools and libraries to enhance your actions further.

Using a language such as C# allows you to structure your actions using object-orientation, letting you re-use code and create abstractions that are difficult to create using a scripting language.

Visual Studio also provides features to re-factor code that gets too complex, and provides many compile-time errors that will help create more reliable code. More information on using the .Net SDK to create plug-in DLLs can be found in Connectivity.

Saying that, there is nothing as convenient as typing a few lines into the web-browser interface of WorkflowFirst to create a new action. The turnaround can be in seconds. As well as being a powerful language, DbfScript employs a special syntax that makes working with a hierarchical database more intuitive. This is the primary reason that a new language was created, rather than using an existing language. DbfScript provides a wealth of functionality allowing you to query data from anywhere in the database. A comprehensive list of functions and keywords can be found in Automated Testing.

Next Topic: Action Parameters