Skip to main content
Matrix42 Self-Service Help Center

Use Workflow to implement "Report Accident" action

Goal

The article demonstrates how the different components of the Solution Builder can be used for implementing a full-fledged business use case. The Schema Designer is used for defining "Data Model",   the Layout Designer used to constructing the "User Interface", whereas the Workflow Studio is used for describing the feature Business Logic.

Requirements

To implement an action that allows in a few clicks reporting an accident with the car. Depends on the entered data an Incident object is created for the "Facility Management" role and if the car seriously crashed then the evacuation service is ordered.

Step 1. Create Workflow

Before implementing the Wizard User Interface it is important to create a Workflow with at least a defined list of required input arguments. Having this list will be much easier to design the Wizard, as far as the only purpose of the Wizard in such a case, is to collect and assign the required data to Workflow input arguments.

  1. Start Workflow Studio
    Open "Administration / Workflows" are and click "Workflow Studio"
     
  2. Create a new Workflow
    Define the workflow  name "Fleet Management - Report Accident"
    Set Workflow Integration Context to "Action"
     
  3. Define the Input Arguments
    "Comments" string - description of the Accident;
    "CarId" Guid - object Id of the car trapped to the accident;
    "Address" string - address of the accident;
    "Evacuate" bool - signals car seriously crashed and and requires evacuation
     
  4. Define the business logic
    Drop "Create Object" Workflow activity to create an Incident object
    If the car requires the evacuation put the car state to "Broken" with "Update Object" Activity, and create a Task for "Fleet Management" team to order the evacuation service
     
  5. Check-Out and Release the Workflow
    If your System uses Matrix42 Worker for Workflow Processing the Workflow Publishing is not required, otherwise, also Publish workflow

    clipboard_eabde934a9fff2cc161f8cb477ae0179f.png

Step 2. Create UI Action

1. Create Action
In Administration/User Interface/Actions Management Area create a new Action:
Title: "Report Accident"
Type Filter: "Specified Only"
Configuration Items: "Ud_FLMCarType"
State Filter. "Specified Only"
Status Values: "Active"
Implementation: "Run Wizard", in Wizard pickup click to create a new wizard

clipboard_ec9af0cf542f4ead8ed3b4157a8d90fd1.png

2. Create Wizard layout

Name: "FLM Report Accident"
Implementation: "Setup Wizard Workflow"
Workflow: "Fleet Management - Report Accident"

Step 3. Design Action Wizard
clipboard_ee3206bbc99c0b0a0241daf9faf932dee.png

Step 4. Evaluate Results

Export the "Fleet Management" Project to Configuration Package

  • Was this article helpful?