Blog Posts Process Management

What is a Business Object?

Implementing business objects with cDevWorkflow

A cDevWorkflow business object (BO) is an object that provides design and runtime integration with API-accessible elements of other applications. cDevWorkflow business objects are implemented using the “deIBusinessObject” interface. Business Object 1 Business objects are configured with a class name, namespace and their DLL file name. Once configured, these business objects become available within the workflow designer and can be used to get and set their BO property values in workflow processes. By using the “getBusinessObject” step, the business object can be retrieved at runtime and its properties used within other workflow logic. For example, if a “Person1” BO has a property called “age”, this “age” property can be referenced within a “Decision” step evaluation statement: int.Parse(“cDevBO.Person1.age”) == 15 

Writing a custom Business Object

A custom BO can be implemented using the interface “deIBusinessObject”. Below is sample code for clsPersonBO business object.Business Object Code

Configuring the Business Object

 Once the custom business object is compiled, place the DLL file in the cDevWorkflow’s “bin” folder and use the Auto Detect feature to configure it.Business Object 2  

Using the Business Object within a Workflow process

First, make sure the above described “clsPeronBO” object has been configured within the Business Objects section of cDevWorkflow’s Configuration Manager. Create a new Workflow Definition called “TestBO Def”. Business Object 3 Next, open the new “TestBO Def” definition within the graphical designer.Business Object 4 Using the designer toolbar button “Manage Business Objects”, let’s define a business object to be used within the process.Business Object 5 Manage Business Objects UI will render within the right pane as follows:Business Object 6  Let’s create a process level Business Object called “Person1” that is type “clsPersonBO”.Business Object 7  Now that the Business Object is defined, we can use it within the process. Add a “getBusinessObject” step to the workflow design and connect it to the “start” step. Business Object 8  Click the “getbusinessobject” step to configure its properties:Business Object 9  You can also configure properties such as the time to live (ttl) and whether to load properties on demand for the business object. If ttl is configured, the business object will automatically update itself after the expiration period. For example, if the BO has an expiration of 10 minutes, whenever the workflow runtime accesses that business object it will check to see if the BO property values have been retrieved from the source system within the last 10 minutes. If the ttl has expired, the BO will refresh itself automatically to provide the latest information to the process.Since our sample BO has a property called “age”, let’s use that property to make a decision. Add a “decision” step to the designer canvas and connect it to the “getbusinessobject” step.Business Object 10 Let’s use the decision step to figure out if Person1.age is greater than 18 years. Click the “decision” step and configure the properties as shown below. Business Object 11 Save the changes to the definition so that it is ready to execute.Business Object 12 Navigate to the Workflow Instances menu item and create a new Instance, selecting definition “TestBO Def” and entering an instance name.Business Object 13 Once the Instance is created, select the Instance and execute it. Business Object 14  Once execution is complete, the Instance should have a status of “finish”. Click the “Render” button on the toolbar to render the executed Instance.Business Object 15 The rendered Instance will look as follows:Business Object 16 Click the “check age is > 18” step to drill down into the step information.Business Object 17 The decision step should render as follows:Business Object 18 As we can see in the above graphic, the decision step evaluated the expression ‘int.Parse(“cDevBO.Person1.age”) > 18’ and returned a value of “True” for the return value of the step. Click the “Properties” button to view the properties for the step.Business Object 19  Click the icon next to the condition to view the expression with BO replacement values:Business Object 20  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.

Leave a Comment

Get the BPI Web Feed

Using the HTML code below, you can display this Business Process Incubator page content with the current filter and sorting inside your web site for FREE.

Copy/Paste this code in your website html code:

<iframe src="https://www.businessprocessincubator.com/content/what-is-a-business-object/?feed=html" frameborder="0" scrolling="auto" width="100%" height="700">

Customizing your BPI Web Feed

You can click on the Get the BPI Web Feed link on any of our page to create the best possible feed for your site. Here are a few tips to customize your BPI Web Feed.

Customizing the Content Filter
On any page, you can add filter criteria using the MORE FILTERS interface:

Customizing the Content Filter

Customizing the Content Sorting
Clicking on the sorting options will also change the way your BPI Web Feed will be ordered on your site:

Get the BPI Web Feed

Some integration examples

BPMN.org

XPDL.org

×