Skip to main content

Task 1: Create a new employee for a certain company

The following Workflow will create a new employee for a selected company. A welcome present (this will be displayed as a activity) will be sent. This process is about creating a new employee for a certain company and sending a welcome present to this person. Based on the gender of the person, the present will be different.

Overview

This step by step guide will show you how to create a Workflow from the Flowable Modeler to the implementation of the source code. The final result (together with Task 2) could look like this:

finished Workflow

Currently there are no translations for the different fields in the workflow modeler.

Step 1: Open and create the Workflow

Start the Flowable Modeler before the ADITO server and open the ADITO client. Like mentioned before go to the context "Workflowdefinition" and click "create a new model".

A dialog will open and you have to enter the following fields:

  1. Model name: Create Contact Person

  2. Model key: createContactPerson

Step 2: Create an 'User Task'

An 'User-Task' is a task where a human performer performs the action that completes the task. We want the user to fill the information for the person that gets created.

On the left side of the canvas there are all folders with the corresponding content. Open 'Activities' and drag an 'User Task' in.

Click on the User Task and a new set of properties will appear in below the canvas. Fill the following properties:

  1. Name: Create Contact Person

  2. Assignments:

    1. Type: Identity store

    2. Assignment: Assigned to single user

    3. Search: Tim Admin (click it to assign him to Assignee)

      1. If this user doesn’t appear, use a group like support to assign the task!
  3. Form properties:

    1. Add 4 data sets:

      1. Id: salutation | Name: Salutation | Type: String | Required: true

      2. Id: firstname | Name: Firstname | Type: String | Required: true

      3. Id: lastname | Name: Lastname | Type: String | Required: true

      4. Id: gender | Name: Gender | Type: Enum | Required: true | Variable: gender

        1. Id: f | Name: Female

        2. Id: m | Name: Male

        3. Id: g | Name: Divers

The type "Enum" will expand the fields and you can enter lists, which the user can select.

The properties of the "Form properties" are located in an JSON-object. This will later be used to create our person and help identify the Sequence Flow for the gender-oriented present in task 2.

Connect the events by holding the Sequence Flow from the 'Start-Event' to the 'User-Task'.

Step 3: Create a 'Service Task'

A service task performs a 'technical' task. It triggers as soon as its completed the previous step. This is usually a ADITO process which can be found in the 'process' folder under 'workflow'. This is where the most customizing will happen if different tasks are defined.

Repeat this steps but this time with a 'Service-Task'. Fill the following properties:

  1. Name: Notification for new Contact Person

  2. Id: createNotficationPerson

  3. jDito process:

    1. jdito process: Create notification

    2. Parameters:

      1. Caption: New contact person has been created

      2. Description: A new contact person has been created

      3. User: Tim Admin

Connect from the 'User-Task' to 'Service-Task' with the arrow.

Step 4: End the Workflow

An 'End Event' signals the end of a Workflow. Therefore if this point is reached the Workflow will be completed.

Add an 'End Event' and connect the Sequence Flow from the previous task to this.

Step 5: Save your progress

Save the model (upper left corner) and press 'Save and deploy'. The rest-webservice will deploy the changes to ADITO and will redirect you back to your ADITO client.

Step 6: Get your Workflow in ADITO

Now go in the created Workflow and click on the tab to Usage (Verwendung) and press the edit button (pencil) and select company.

After this you can open the company filter view and click once on a company, to open the preview. Click on the three dots and open the action 'start workflow' ('Workflow starten') and a new preview appears. Select your workflow process and press save again.

  1. Move to your home dashboard and add a new dashlet ('My own Workflow Tasks' or 'Meine Workflow Aufgaben').

  2. Now there should be a task with your given title.

  3. Click on this task and confirm your task.

  4. A new preview opens and fill in your data (later this data will be the new employee information)

  5. As soon as you save your data a notification should pop up.