Writing Logic

Writing Logic

Logic Overview

Logic can be written in three locations:

Workflow Logic Status

Status Action Button

Form Field Event button

Logic is the back-end process that handles the processing of data. It is made of a series of steps to accomplish a goal.

These steps in logic can be accomplished using services or “Functions” which serve as the building blocks for the logic flow.

In a workflow context, these logic statuses contain the logic for any additional data management between receiving the information via forms, and committing the information to JDE.

For Example: A workflow has a “Form” status which will receive information from an end user, such as updating a customer’s address, a “Logic” status can be used to confirm the customer that is being updated actually exists before attempting to commit to JDE. The logic status will then also contain the logic to commit to JDE as well.

Introduction to Functions

Functions are units of logic, made up of a sequence of actions to perform a specific task. Functions can be used independently, or as a step in the flow of logic. Functions are created so that the logic for a simple task can be designed once, but implemented in several places without having to recreate those steps by hand every time.

The no-code platform provides a series of pre-built functions such as “Substring” and “FormatDateTime”. If at any point you need a function that has not been provided, your IT/Technology Partner can create one for you. We also have a “Placeholder” function feature which allows you to continue working without waiting for your IT partner to finish creating the function. This “Placeholder” feature is further explained below.

Functions Page

The no-code platform has a “Functions” page under the “Design” category which contains a collection of preconfigured functions for simple tasks that may need to be performed in multiple different processes, such as “CurrentDate” which simply returns the current date.

The “Functions” page

The “Functions” page displays a list of functions with their description and examples when they would be used. The list also provides buttons for each function that allow the business user to learn more information regarding the function, add the function to a logic canvas, view the function’s logic, try the function in an example context, or checkout and edit the function–which would take place in a project.

Placeholder Functions

The “Functions” page also provides “+” and buttons in the top right to create a new function if necessary.

A “Placeholder” function can be created by a business user and essentially works as a rough draft to state what function needs to be created, and what it should do, without needing any coding.

Then, an IT/Technology Partner user can design a fully functioning and dynamic version of the function to replace the placeholder. The placeholder concept separates IT work from business work and lets them work at their own pace in fully parallel mode.

While waiting on IT, you can use our placeholder concept and proceed with your business process.

The “+” button on the functions page will open the “Add A function” widget

When creating a new function, the window will prompt the business user to enter a “Name”, “Description”, and the “Usage” information which will explain when this function will be used. There is also space to define the input and output, define whether the function will loop, and select the category and subcategory the function falls under.

There is a “Placeholder Mode” checkbox to define what type of function is being created. When the box is checked, a “Sample Function Input” and  “Sample Function Output” section is revealed.

The sample input/output section that is revealed when the “Placeholder Mode” box is checked.

A placeholder function uses a sample input/output pair to run. You pass a sample input and you get a sample output specified.

This version can be used while you are waiting for your IT/Technology partner to create an actual function for you.

Logic Creation

Logic is created on a  “Logic Canvas” where the steps can be configured. The logic canvas can be accessed by any of the three locations logic is used.

The Logic Canvas for a new  Logic Status

The left panel of the logic canvas holds a collection of “Tools” and “Functions”, which are essentially the building blocks of the logic.

Adding a Function

The “Functions” tab found in the left side panel of the “Logic Canvas” lists all existing function options which can be added to the canvas using the drag and drop UI feature.

If the provided functions do not meet the requirements needed for the task, custom functions can be created on the “Functions” page.

Functions can be dragged and dropped onto the canvas from the left panel, and double clicking the function will allow the user to change the name as it is seen on the logic canvas.

Selecting the red square will allow the user to configure the input values for the function.  Checking the “Show” checkbox will allow the user to configure the input, and it will be indicated in the red square.

Selecting the red square on the “AddressBookExists” function opens an “Edit Service Inputs” window

Selecting the blue square will allow the user to configure the outputs for the function. Checking the “Show” checkbox will allow the user to configure the output, and it will be indicated in the blue square.

Selecting the blue square on the “AddressBookExists” function opens an “Edit Service Outputs” window

When added to the canvas, the “AddressBookExists” function appears as seen above. Note the red input square and the blue output square both now say “1”.

Configuring the Flow of Logic

The nodes on the outside edges of the services can be used to connect the services together, and determine the flow of logic, or the order of the steps taken.

Here is an example of a basic two step logic flow.

Now that we have reviewed business processes and the three main components Workflow, Form, Data, and Logic, we are ready to see them applied in a real business process example.

The EASYProcess No-Code Training Guide will walk you through examples step by step to create your own business process.