Basics of creating workflows

In this section, the basic principles of developing a workflow with the 'ElectroNeek' platform are considered

Introduction

To develop a workflow, the 'ElectroNeek Studio' program should be opened. The 'ElectroNeek Robot' program is run automatically while 'ElectroNeek Robot' is opening. The 'ElectroNeek Robot' tool is used to execute the workflow developed by the user.

From this point on short names of 'Studio' and 'Robot' will be used to refer to 'ElectroNeek Studio' and 'ElectroNeek Robot' accordingly.

Interface

The picture below shows the interface of the 'Studio' application.

The numbers on the picture represent the following:

  1. A group of buttons to create, open and save a new workflow. The last button in this group allows users to publish workflows for execution by the Orchestrator. The detailed information about the Orchestrator can be found on this page.

  2. A block with activities, grouped by the activities they automate.

  3. A button to launch the workflow. When the workflow is running, the stop button will be displayed nearby.

  4. Input field for searching for an activity by its name.

  5. Tab 'Elements', which allows you to work with elements of the application interface. The detailed information about this tab can be found on this page.

  6. The name of the file with the workflow. When you put the cursor over this item - a path to the opened file with the workflow is displayed (if a user creates a new workflow and doesn't save it then the 'New file' phrase will be shown as on the picture above).

  7. A button to open a new tab for working with several workflows inside 'ElectroNeek Studio'.

  8. A button that opens a search field to search for activities, variables and comments in the current workflow.

  9. Tab 'Activity Properties', which allows you to read the description and set parameters.

  10. Left-to-right: button to start the interface tour, button to display information about the current account and available resources, the platform logo (the documentation is opened after clicking the logo).

  11. 'Variables' tab displays all variables initialized in this workflow. There is also a group of buttons for working with variables - for updating and deleting current values of variables, adding a new variable and checkbox for automatic cleaning up of variable values after the robot's work.

  12. The workspace where activities can be added and connected.

  13. The console where robot messages status appear.

Workflow

The so-called 'Visual programming' is used to create a workflow. A user adds activities to the workspace which are shown as blocks. Each activity has parameters to set according to the business process.

With JavaScript expressions it is possible to make the workflow more functional and flexible. In particular, the 'Execute JS code' activity can be used to store some JavaScript workflow.

All variables (apart from those that were created inside the 'Execute js code' activity) are global and saved in the current account. This means all these variables are accessible from any workflow and any activity.

If a user creates a variable inside the 'Execute JS code' activity, it will not be accessible in other activities.

Activity

To add an activity to the canvas, a user double-clicks the corresponding name from the left panel or drag and drop the activity directly to the workspace.

Clicking on the activity will activate the 'Properties' tab where the parameters are displayed and can be set. All required parameters are marked with a red star. Each activity has the 'Comment' field. This allows to give a description to the activity so it will be easier to understand the role of the activity in the process.

The 'Send email' activity parameters

If the activity is highlighted with red, then some of the required parameters are not set.

Example of a activity with unfilled values of mandatory properties.

Each activity contains at least two ports (ways to follow the workflow). The branch coming out of the standard port corresponds to successful execution of the current activity. The branch coming out of the red 'Error' port is used when an error has occurred during execution of the current activity. Logical activity contain three ports: 'Yes', 'No' and 'Error'.

Activities can be moved, copied or deleted. It is possible to select several activities by holding the "Ctrl" key and clicking on the desired activity or select an area where the necessary activities are located. Multiple activities can be moved, deleted, copied, and pasted simultaneously.

Tips

While developing a workflow, it is recommended to stick to the following practices:

  1. Split one large program into small subprograms based on the logic and goals of the process. This will help to see the workflow's structure better, understand its idea easier, and make changes faster.

  2. Try making a workflow neat and readable. Delete all activities that were used to debug and have no practical value. Comment activities and make use of the 'TODO' activity. This is useful if several developers are working on the project as descriptive comments will help to understand the code better and faster.

  3. Give readable names to variables and subprograms that clearly reflect its purpose. There are some widely used notations (as shown in the table below) and it is recommended to stick to a single standard.

Notation

Example

Camel

ListOfContragents

Snake

list_of_contragents

Hungary

arrListOfContragents