Chapter 8: Automated Processing in the Middle of a Workflow

Through the previous seven chapters, we have been able to turn a complex workflow into a workflow app. For the next step, chapter 8 explains how to implement tasks that are processed automatically by Questetra in the middle of the workflow. By using auto-processing tasks, you can make your workflow even more efficient.

In this chapter, we will create an app that inputs data related to a meeting schedule, formatting the data into a predefined text style, and sending an email to confirm the meeting schedule.

In actual work, it is unlikely that sending an email to another party to confirm the meeting schedule would be the only automated step, but for the sake of explanation, we have made it a simple task here.

Note: With the Advanced and Professional editions, more advanced automation processes can be incorporated into the workflow, such as adding an appointment to Google Calendar and then sending an email to the meeting partners.

Automatically Aligns Input Data to a Format

Let’s create the app in two phases. First, we will create an app with the following workflow diagram that automatically creates text to be sent by email.

So now create a new app by selecting [App Settings] > [New App].

Edit Workflow Diagram

  1. Place the [Start Event], a [Human Task], an auto-processing task [Update Data], another [Human Task], and an [End Event] in the Swimlane in this order

    The Auto-Processing task [Update Data] is among icons that appear when you click on the [Auto-Processing Task] icon in the palette

    (This image is for the Professional Edition)
  2. Rename each object as follows
    • [Human Task]: Input
    • [Update Data]: Text Formatting
    • [Human Task]: Confirmation
  3. Select [Flow] from the palette, and connect the icons one by one with flows, starting from [Start Event]

The workflow diagram should now look like this.

“Text Formatting” will be set later because it cannot be set without a destination and source data item, so we will set this last.

Editing Data Items

Now set up the data items. Here, we are using a new data type, Datetime. The difference between Date-type and Datetime-type is that a Datetime-type item has time information.

Now, let’s set them up.

  1. Click on the [Data Item] tab to switch to the data item editing screen
  2. Add the following data items
    • [String (single line)]
    • [String (single line)]
    • [Datetime]
    • [Datetime]
    • [String (multiple lines)] 
  3. Change the item name, field name, and required field confirmations as follows
    Data TypeItem NameField Name Required Item
    String (single line)Name of Personq_Name_of_PersonYes
    String (single line)Placeq_PlaceYes
    DatetimeStart Timeq_Start_TimeYes
    DatetimeEnd Timeq_End_TimeYes
    String (multiple lines)Formatted Textq_Formatted_TextYes
  4. Change the number of columns for “Start Date and Time” and “End Date and Time” to 2. The status of the data items will be as follows
  5. Click on the tabs in the workflow diagram to switch screens, and set the [Editing permission] as follows in the settings dialogs for the “Input” and “Confirmation” tasks
    Data ItemInputConfirmation
    Title(editable)(display only)
    Name of Person(editable)(display only)
    Place(editable)(display only)
    Start Time(editable)(display only)
    End Time(editable)(display only)
    Formatted Text(hidden)(editable)

Note that the Formatted text is [(hidden)] in the Input task and [(editable)] in the Confirmation task.

Set up the Processor

Next, let’s set up the person in charge of processing. Again, we will set up the process so that everyone belonging to the company can start the process.

As already learned in Chapter 5, to cover all employees belonging to Organization A, it is necessary to set both members who belong to Organization A and members who belong only sub organizations of Organization A as processors in the swimlane where the start event is placed.

So, let’s set them up.

  1. On the workflow diagram edit screen, open the swimlane “Processor” settings dialog box
  2. Change the name to “Schedule Setter” and edit the item with “You” as the person in charge of processing
  3. Select “Organization”, “00 Whole Company”, and “Members who belong to this”, and click [OK]
  4. You will see the swimlane dialog again, then click the [Add] button to add another Operator specification
  1. Select “Organization”, “00 Whole Company”, and “Members who belong only sub organizations of this”, and press [OK]

It should look like this.

Click [Apply and Close] to close the swimlane settings dialog.

Formatting Texts Using [Update Data]

Now create formatted text using the auto-processing task [Update Data]. To format text with [Update Data], a template must be set up in advance, including the formats for referencing the data item values. When the task is actually processed, the referencing format for each data item is replaced with the value of the item.

  1. In the “Formatting Text” settings window, select “Formatted Text” as the data item to be set
  2. Click the “Edit” button to create the template for “Formatted Text”
  3. Select the following data items from [Insert reference…] and insert the formatting to display the values to be stored in the data items
    • “Name” (#{#q_Name_of_Person} will be inserted)
    • “Place” (#{#q_Place} will be inserted)
    • “Start Date & Time” (#{#q_Start_Time} will be inserted)
    • “End Date & Time” (#{#q_End_Time} will be inserted)
  4. Enter sentences before/after the formatting
  1. Press [OK], then click [Apply and Close] to close the “Text Formatting” settings window

Release the app and see how it works. Are the values entered the in data items inserted into the formatted text? If not, edit the template again in the “Text Formatting” auto-processing process. It may also be useful to start by experimenting with the formatting of the data item references by inserting them without embellishment. Don’t forget to release the app after you’ve finished editing.

Automatically Send an Email in the Middle of the Workflow

Next, we will modify the app to send the formatted text with inserted data item values by email.

First, modify the workflow diagram as follows.

Modifying the Workflow Diagram

  1. Click [Edit] on the application details screen to open the modeler
  2. When the Workflow Diagram screen appears, select [Throwing Message Intermediate Event (email)] from the palette and add it after the “Confirmation” task. The [Throwing Message Intermediate Event (email)] icon is displayed by clicking on [Intermediate Event] on the palette
  3. Click the [touch_app(select)] icon on the palette to switch to select mode, then click and drag the end of the flow from the “Confirmation” task to the [End Event] to redraw the flow to the [Throwing Message Intermediate Event (email)]
  4. Click the [Flow] icon in the palette and draw a flow from the [Throwing Message Intermediate Event (mail)] to the [End Event]

Adding Data Items

  1. Switch the modeler to the Data Items screen
  2. Add two “String (single line)” items and set them as follows
    Data TypeItem NameField NameRequired Item
    String (single line)Email Addressq_Email_AddressYes
    String (single line)Email Titleq_Email_TitleYes
  3. Reorder the items so that “Name of Person” is followed by “Email Address” and Email Title”

The Data Items should look like the image above.

Next, set the editing and viewing permissions for the two data items you have added.

  1. On the data item settings screen, click [Editing permission] for “Email Address”
  2. Select [(editable)] for “Input” and [(display only)] for “Confirmation”
  3. Click “Apply and Close” to close the editing permission settings screen
  4. In the same way, click [Editing permission] of “Email Title” and select “(editable)” for “Input” and “(display only)” for “Confirmation,” then click “Apply and Close” to close the settings screen

Click the workflow diagram tab to switch screens, and open the settings window for “Input” to check the editing permissions for data items in the task. Check for “Confirmation” as well. The editing permissions for the “Input” and “Confirmation” tasks should be as follows

Data ItemInputConfirmation
Title(editable)(display only)
Name of Person(editable)(display only)
Email Address(editable)(display only)
Email Title(editable)(display only)
Place(editable)(display only)
Start Time(editable)(display only)
End Time(editable)(display only)
Formatted Text(hidden)(editable)

Throwing Message Intermediate Event (email) settings

Finally, let’s set up the “Throwing Message Intermediate Event (email)” for sending an email with the formatted text.

  1. Open the “Throwing Message Intermediate Event (email)” settings window and set each item as follows
    • [Step Name]: Change to “Sending”
    • [To]: Select and specify the data item “Email Address” from [Insert reference…]
    • [Subject]: Select and specify the data item “Mail Title” from [Insert reference…]
    • [Body (Plain Text)]: Select the data item “Formatted text” from [Insert reference…]
  2. Click “Apply and Close” to close the [Throwing Message Intermediate Event (email)] settings window

This completes the process. Let’s publish the app and see how it works.

You have finished eight chapters and learned how to install Questetra and how to create workflow apps with Questetra. Now you can create a workflow application for many common business operations by combining what you learned.

chevron_forwardChapter 9: Making Workflow Apps Assuming Actual Business Operations

chevron_backward Chapter 7: Changing the Process Depending on the Situation

Scroll to Top

Discover more from Questetra Support

Subscribe now to keep reading and get access to the full archive.

Continue reading