Overview

Once the desired processes are defined in the platform, they are ready to be used. Each time a process needs to be used, for example each time a customer wants to request a new credit card, a new instance of the specified process definition is started in the platform. Think of the process definition as a blueprint for a house, and of the process instance as each house of that type being built.

The FlowX.AI Engine is responsible for executing the steps in the process definition and handling all the business logic. The token represents the current position in the process and moves from one node to the next based on the sequences and rules defined in the exclusive gateways. In the case of parallel gateways, child tokens are created and eventually merged back into the parent token.

Kafka events are used for communication between FLOWX.AI components such as the engine and integrations/plugins. Each event type is associated with a Kafka topic to track and orchestrate the messages sent on Kafka. The engine updates the UI by sending messages through sockets.

More about Kafka

Checking the Process Status

To check the status of a process or troubleshoot a failed process, follow these steps:

  1. Open FlowX.AI Designer.
  2. Go to Processes → Active Process → Process instances.
  3. Click Process status icon.

Understanding the Process Status data

Understanding the various elements within process status data is crucial. Here’s what each component entails:

  • The Status field indicates the state of the process instance, offering distinct values:
StatusIndicates the state of the process instance. Offers distinct values:
CREATEDVisible if there’s an error during process creation. Displays as STARTED if there were no errors during creation.
STARTEDIndicates the current running status of the process.
DISMISSEDAvailable for processes with subprocesses, seen when a user halts a subprocess.
EXPIREDThis status appears when the defined “expiryTime” expression in the process definition elapses since the process was initiated (STARTED).
FINISHEDSignifies successful completion of the process execution.
TERMINATEDImplies a termination request has been sent to the instance.
ON HOLDMarks a state where the process is no longer editable.
FAILEDOccurs if a CronJob triggers at a specific hour, and the instance isn’t finished by then.
  • Active process instance: The UUID of the process instance, with a copy action available.
  • Variables: Displayed as an expanded JSON.

  • Tokens: A token represents the state within the process instance and describe the current position in the process flow.

For more information about token status details, here.

  • Subprocesses: Displayed only if the current process instance generated a subprocess instance.
  • Exceptions: Errors that let you know where the process is blocked, with a direct link to the node where the process is breaking for easy editing.

For more information on token status details and exceptions, check the following section:

  • Audit Log: The audit log displays events registered for process instances, tokens, tasks, and exceptions in reverse chronological order by timestamp.

Audit

Color coding

In the Process Status view, some nodes are highlighted with different colors to easily identify any failures:

  • Green: Nodes highlighted with green mark the nodes passed by the token.
  • Red: The node highlighted with red marks the node where the token is stuck (process failure).

Starting a new process instance

To start a new process instance, a request must be made to the FlowX.AI Engine. This is handled by the web/mobile application. The current user must have the appropriate role/permission to start a new process instance.

To be able to start a new process instance, the current user needs to have the appropriate role/permissions:

Configuring access roles for processes

When starting a new process instance, we can also set it to inherit some values from a previous process instance.

Troubleshooting possible errors

If everything is configured correctly, the new process instance should be visible in the UI and added to the database. However, if you encounter issues, here are some common error messages and their possible solutions: Possible errors include:

Error MessageDescription
“Process definition not found.”The process definition with the requested name was not set as published.
“Start node for process definition not found.”The start node was not properly configured.
“Multiple start nodes found, but start condition not specified.”Multiple start nodes were defined, but the start condition to choose the start node was not set.
“Some mandatory params are missing.”Some parameters set as mandatory were not included in the start request.
HTTP code 403 - ForbiddenThe current user does not have the process access role for starting that process.
HTTP code 401 - UnauthorizedThe current user is not logged in.

Exceptions

Exceptions are types of errors meant to help you debug a failure in the execution of a process.

Exceptions can be accessed from multiple places:

  • Failed process start tab from Active process menu in FlowX.AI Designer.
  • Process Status view, accessible from Process instances list in FlowX.AI Designer.

Exceptions data

When you click view button, a detailed exception will be displayed.

  • Process Definition: The process where the exception was thrown.
  • Source: The source of the exception (see the possible type of sources below).
  • Message: A hint type of message to help you understand what’s wrong with your process.
  • Type: Exception type.
  • Cause Type: Cause type (or the name of the node if it is the case).
  • Process Instance UUID: Process instance unique identifier (UUID).
  • Token UUID: The token unique identifier.
  • Timestamp: The default format is - yyyy-MM-dd'T'HH:mm:ss.SSSZ.
  • Details: Stack trace (a stack trace is a list of the method calls that the process was in the middle of when an Exception was thrown).

Possible sources

Exceptions type

Based on the exception type, there are multiple causes that could make a process fail. Here are some examples:

TypeCause
Business Rule EvaluationWhen executing action rules fails for any reason.
Condition EvaluationWhen executing action conditions.
Engine

When the connection with the database fails

when the connection with Redis fails

DefinitionMisconfigurations: process def name, subprocess parent process id value, start node condition missing.
NodeWhen an outgoing node can’t be found (missing sequence etc).
Gateway Evaluation

When the token can’t pass a gateway for any reason, possible causes:

  • Missing sequence/node
  • Failed node rule
SubprocessExceptions will be saved for them just like for any other process, parent process ID will also be saved (we can use this to link them when displaying exceptions).