Share:

Abstract Business Entity

Abstract means there is no third party system behind, but it can be used equally to a business entity mapped to a third party system. Abstract business entities are mostly used when you want to store a table of data that is not persistent in a third party system. In this tutorial, we will read data from a csv file and with the abstract business entity you can map the fields to the csv columns and email them to a colleague for example.

Create a Business Entity

To create an abstract business entity, open a model in the Business Entities designer. Drag and drop a new Business entity item to the canvas. Right-click it and select Field definitions.

In the opened wizard click Add field, now choose a name and type which fits your use case. Hit OK and then save your file.

Process Model and Workflow Variables

Create a new Process Model. We will use the Start element to load a .csv into a workflow variable via File Picker. Then we are going to use the Read CSV Activity to read each column and store it in our abstract BE. Finally, we will receive a Task, which contains a list of the data from the csv file.

In the next steps, you will learn how to configure each element and check if your workflow executes properly. First of all, you need to edit your workflow variables and create a new attachment field.

Click on Add field and enter Name and Type. Click OK.

Click Define Business Entity and add double-click yours. Hit OK double-click your BE again and hit OK.

Configure the Start Element

Drag & drop a Start element onto the canvas then right-click it and choose Edit event. Select External event, click on Workflow Variables, then hit OK

Right-click the Start element and click Select business entity fields

Select your attachment field by double-clicking it. Make sure to set it to output (red arrow). Hit OK. FireStart will auto-generate a form, which contains a File Picker, where you can drop your .csv.

Configure the Read CSV Activity

Drag & drop a Read CSV activity onto the canvas, right-click Select business entity fields

You have to mark your attachment field as input (green arrow) and the fields of your abstract BE as output (red arrow). Hit OK.

Right-click the Read CSV activity again and click Edit Workflow Bindings. 

  1. Click on the little cube and select your attachment field by double-clicking it.
  2. Configure the Separator according to your input file.
  3. Tick the checkbox if the first row of your csv contains column names.
  4. Select your abstract BE as Output data. Click Add column 3 times.
  5. Connect the columns via drag & drop. Hit OK (Make sure you connect the right columns to your business entity fields)

Configure the Task element

Drag & drop the Task element onto the canvas, right-click Select business entity fields. 

Select your business entity and double-click each field. I/O stays on input. Hit OK.

Next step is to right-click the Task element again and click Form builderRemove the auto-generated labels and textboxes (FirstName, LastName, UserID). Grab a table and drop it onto the canvas. The properties of the table are displayed on the right side. Select your abstract BE (Database). Then click Add columnNow you can select your abstract BE fields. Add 3 columns, one for each element. Hit Finish


To see if everything works we are going to assign the task to the person which started the workflow. Right-click the Task element and click Select user in chargeGo to the tab Dynamic click on Business Entity Fields. Click on Workflow Variables then tick the checkbox at the bottom to Show system fields. Double-click the field EXECUTION_STARTED_BY. Hit OKNow select User name from the list displayed on the left side and EXECUTION_STARTED_BY from the list displayed on the right side. Hit OK.

Now you are ready to test your workflow by first saving it and then deploying your model to execute the process afterward.

Execution

Navigate to the Publish tab, deploy (Deploy process) your model and press Start Process(F8). We are going to load the following csv file into a workflow variable via the File Picker (Click Browse, choose your csv file and click Upload). 

Now click on (1.) Workflows, then double-click your (2.) process, now click on (3.) the database cube and check how your csv was stored in the abstract BE. Click on (4.) Tasks. Double-click your task to see the result.

As you can see, everything worked fine.



Previous | Next