My first: Workflow configuration

How to create your first workflow configuration

This post is meant as an example to create your first working workflow.

This is not an explanation of everything that can be done by using workflows, and also not an explanation of all the fields.

For more info and details, see this post: Workflow configurations

Introduction

We are going to create a workflow configuration that contains user interaction and a process call.

The overall way of working of all workflow configurations is:

  1. Create a workflow configuration record.
  2. Create a workflow step.
  3. Set the initiating transaction (Important step that is best to do ASAP)
  4. Creating a second step
  5. Adjusting the transition expression
  6. Making sure there is an end to the workflow.

1. Create a workflow configuration record

First add a new workflow configuration:
Settings > Workflow configuration > add button

2. Add a step: User interaction

a. Click add from workflow configuration page:


b. Fill in an internal_name (this name can be referenced to in later workflow steps. Make sure to use lowercase and underscores).
c. Choose step_type: User interaction
d. Save the step.

e. In the Questions and Buttons forms you can ask input from the user. Let’s start with asking a question.
f. Add a question.

g. Next we will add a button.

3. Add a initiating transition

  1. Go back to the workflow configuration page and add an initiating transition.
    The reason you need to add this is so the workflow configuration know with which step to start. This is also required if you want to reference other workflow-steps, because the system will check if the workflow-step is within context.
  2. Choose in the ‘To’ searchlink your created step.
    By leaving the “From” empty, the system know this is the first step.

4. Add a step: Process call

a. Go back to the workflow-step we created in step 2. From here we will create a new workflow-step by using the “Outgoing transitions” form.
This streamlines the flow of creating the workflow-steps and will automatically create a transition between the steps.
-


-
- Click “Add”.
b. Fill in an internal_name (this name can be referenced to in later workflow steps. Make sure to use lowercase and underscores).
c. Choose step_type: Process call
d. Choose process call: Add/Edit (if this doesn’t exist yet, see this topic about proces action definitions)
e.
f. Also fill in the parameters that belong to the chosen process:

  • record: “organizations:getnull()”
  • values: “[<“name”, this.my_first_workflow_step.question_text.concat(” - Created by workflow at “).concat(datetime:now().tostring())>]”
  • This expression might be a bit intimidating, below a short description:
    • This is the syntax [<“fieldname”, where expression>]
    • “my_first_workflow_step” refers to the workflow-step we created. If you used a different name, this needs to change accordingly.
    • “.question_text” will return the value provided by the user for that question. If you used a different name, this needs to change accordingly.

g. Save the step

5. Adjust the transition by providing an “if true” expression

a. Within the workflow step of step 3, click on the incomming transition. This will open a form where we can provide an expression.

b. We want to listen to when the user clicks on the “Next” button. This can be done by using this expression.

6. Add outgoing transition that ends the workflow

  1. Open the step from step 3 again and add an outgoing transition:
  2. Leave “To” empty in this case, so the transition goes from this step to nothing (end of workflow)


[Topic ideas]

  • Example of all step types
    • Currently available: User interaction; Process call

If you have any suggestions for more examples, please comment below.

Great @Yori !

I also created a simple How to that can help to configure a first workflow including progress display for a new relation:

3 Likes