Let’s start with how this works with data types! First, define and build your custom data type DLL (http://www.cdevworkflow.com/workflow-development/workflow-data-type shows users how to build custom DLLs). By default, cDevWorkflow will then use the name of the data type class as the displayed name of the data type. The user is able to overwrite the default data type name by defining a dataTypeData attribute at the class level:
Within the above statement, the parameter “select definition list” defines the data type name.
Place your custom data type DLL file in the “…\cdevworkflow\bin” directory. In cDevWorkflow, open the Steps -> Data Types page and click the “Auto Detect” button on the toolbar.
Then, a list of auto-detected data types to configure will appear (see below.) Select your data types from the list and click the “Configure” toolbar button to automatically configure the selected items as cDevWorkflow data types.
There is more work involved to define step information. First, you create a cDevWorkflow step by implementing the “deIStep” interface (below):
public class removeFormInstance : deIStep
Reference http://www.cdevworkflow.com/workflow-development/workflow-step for an example.
For cDevWorkflow to auto configure a step, we then implement custom attributes in order to define the a) step name, b) description, c) category, d) inputs, and e) returns.
You define basic step information using the stepData attribute at the class level as shown below:
[stepData("", "remove form instance and its data", "Forms")]
For stepData, the first parameter (“”, above) sets the display name of the step. If left blank, it will automatically use the name of the step class. The second parameter (“remove form instance and its data”, above) defines the step description and the last parameter (“Forms”, above) defines the step category. If the “Forms” category (or whatever category you specify) does not already exist in cDevWorkflow, auto-configuration will create that category and assign your step to it!
You define step inputs using the stepInput attribute at the class level, as shown here:
[stepInput("formID", "Variable that holds the form id", true, "string")]
For stepInput, the first parameter (“formID”, above) defines the name of the input. The second parameter (“Variable that holds the form id”, above) defines the description of the input. The third parameter (true, above) defines whether the input is required and the last parameter (“string”, above) defines the data type of the input. If the data type is not provided, the step input will use the default “string” data type. A step can have any number of input parameters.
You define the step returns using the stepReturn attribute at the class level, as shown here:
[stepReturn("True", "True condition")]
For stepReturn, the first parameter (“True”, above) defines the name of the step return and the second parameter (“True condition”, above) defines the description. A step can have any number of return parameters.
Here are the actual attributes for the cDevWorkflow “renameforminstance” step:
[stepData("", "change form instance name", "Forms")][stepInput("formInstanceID", "Variable that holds the form instance ID", true)][stepInput("formName", "name for the form", true)]
[stepReturn("True", "True condition")]
[stepReturn("False", "False condition")]
Now, returning to our example, compile your custom step and place the DLL file in the “…\cdevworkflow\bin” directory. In order to configure a new custom step within cDevWorkflow, navigate to the “Steps” item on the menu and click the “Auto Detect” button.
The “Auto Detect” screen will render a list of steps that are automatically detected from DLLs that are placed on the cDevWorkflow’s “bin” directory. Select your step in the list and click the “Configure” toolbar button. Your step is now configured and available for use in cDevWorkflow.
This is another example of how cDevWorkflow works hard to make it easier for our users to implement their business automation ideas. This new feature eliminates some of the manual configuration previously required for steps and data types.
You may also be interested in reading more on the subject of Configuring a Custom Workflow Step.
A small sampling of the Workflow Technology for BPM Solutions contained within our cDevWorkflow product offering can be found here: Workflow Technology That Works.
Learn more about our Process Automation & IT, QA Services or Software Development products and solutions on the Web! Visit us at: Innovative Process Solutions