Flokzu Services Integration
In Flokzu you can integrate your process with different applications either through Zapier or by calling external Web Services.
But you can also call Flokzu's Public API to interact with your Databases or with other existing instances.
The first thing you should do is place a Service Task at any stage of your workflow where you want to make the service call and select the Flokzu Services option.
In Database integration we have three available uses:
Add a new record to a database
Edit an existing record
Get data from an existing record
This action will add a new record into the selected Database, filling each column with the content of your form's fields, or a default value.
To call this service you must set up as follows:
Add an optional title to identify the action easily ( 1 )
Select the database you want to add record to (2)
At Input tab you must set up the columns to fill and the form fields from where the source data will be obtained (3). Also, by clicking on the pencil icon, you can set a default value to load into every instance.
This service returns the ID of the new record as output, which can be optionally saved into your form, using the Output tab (4)
With this action you will be able to select the database and edit it's records by setting values from your form, or default values for every process instance.
To configure this integration you must complete the following:
Add an optional title to identify the action easily (1)
Select the Database where the record you want to edit is stored (2)
In the Input tab, you must first set the record ID and then set the target columns and the form fields from where the source data will be obtained (3). By clicking on the pencil icon, you are able to set a default value to load
This service returns true or false as output. True if the record was successfully updated, or false otherwise. Optionally you can save this value in a form field (4)
Keep in mind that when editing a Database record, the existing values will be overwritten.
If the selected ID does not exist, you will be able to add the data as a new record, by selecting the Insert record if it does not exist box.
With the Get Record action you will be able to search within a Database and save the values into the form fields.
Add an optional title to identify the action easily (1)
Select the Database where the record you want to edit is stored (2)
In the Filter tab, you must select the column to be filtered and the value to search. The value can come from a form field or it can be set as a default value (3)
The service will return the values of the columns of the record that matches the filter, and you can save it in your form by setting the target fields in Output tab (4)
If the filter matches with more than one record, only the first record will be returned. To avoid unwanted behaviors, we recommend filtering by a unique value column (For example: ID)
Flokzu also allows you to perform actions on your process instances. With this integration you will have three operations available:
Create a new process instance
Edit an existing instance
Get an existing instance data
You will be able to automatically create a new instance just with a simple service call. To do so, follow these steps:
Add an optional title to identify the action easily (1)
Select the process you want to create (2)
In Input tab you will be able to choose the fields that will be loaded. The value can come from a form field or it can be set as a default value for every process instance (3)
The service will return the identifier of the created instance and it's initiation date. You can optionally save it in your form setting the target field in Output tab (4)
We do not recommend placing this service call immediately after the Start Event unless you are sure that it does not cause loops. For more information, refer to the "Avoid these issues" section.
This action allows you to automatically update a process instance by calling the action in the workflow.
Remember that you can only modify ACTIVE instances, that is, those that have not yet finished.
With this action you will not be able to modify the same instance that is running. In that case you should use the ECHO service from the Flokzu Public API. Refer to the following examples for how to add a creation date, completion date or labels automatically.
Add an optional title to identify the action easily (1)
Select the process of the instance you want to edit (2)
In Input tab you must first set the Instance identifier you want to modify. The following parameters will be the target fields and the source value (from a field or it can also be a default value) (3).
This service returns true as output if the instance was successfully updated, or false otherwise. Optionally you can save this data in a form field (4)
Keep in mind that this action overwrites the fields of the selected instance.
Get Instance allows you to access data from a certain instance and save it in your form, without modifying any of the source data. Set up the service call as follows:
Add an optional title to identify the action easily (1)
Select the process of the instance you want to get (2)
In Filter tab you must set the Identifier of the instance you want to get, referenced in a form field or by clicking on the pencil icon, you can set a fixed default identifier (3)
In the Output tab you will be able to choose which field of the instance (Output) will be saved in your form (Target Field) (4)
To interact with databases or instances from another tenant in Flokzu, you must call the services from the Public API by setting it up with the data provided by an Administrator.
When it happens?
It happens if the first task in the workflow is a Service Task that creates a new instance of the same process.
Description
In this case, each instance created could call the service creating a new instance that starts the cycle again, generating a loop.
This behavior is detected by Flokzu, which will show you an error message and will not allow the execution to continue
When it happens?
If your organization has two processes A and B whose first workflow's task creates an instance of the other process.
Description
In this case, the created instance of process A will create an instance of process B which will create another instance of A, generating a loop.
This behavior is also detected by Flokzu, you will recieve an error message and will not be able to continue the execution.
Recently launched integration with Flokzu services allowing expedite the process of upgrading an instance can review the documentation here.
Flokzu Services Integration
But you can also call Flokzu's Public API to interact with your Databases or with other existing instances.
How to call a Flokzu service?
The first thing you should do is place a Service Task at any stage of your workflow where you want to make the service call and select the Flokzu Services option.
Database Integration
In Database integration we have three available uses:
Add a new record to a database
Edit an existing record
Get data from an existing record
Add record
This action will add a new record into the selected Database, filling each column with the content of your form's fields, or a default value.
To call this service you must set up as follows:
Add an optional title to identify the action easily ( 1 )
Select the database you want to add record to (2)
At Input tab you must set up the columns to fill and the form fields from where the source data will be obtained (3). Also, by clicking on the pencil icon, you can set a default value to load into every instance.
This service returns the ID of the new record as output, which can be optionally saved into your form, using the Output tab (4)
Edit record
With this action you will be able to select the database and edit it's records by setting values from your form, or default values for every process instance.
To configure this integration you must complete the following:
Add an optional title to identify the action easily (1)
Select the Database where the record you want to edit is stored (2)
In the Input tab, you must first set the record ID and then set the target columns and the form fields from where the source data will be obtained (3). By clicking on the pencil icon, you are able to set a default value to load
This service returns true or false as output. True if the record was successfully updated, or false otherwise. Optionally you can save this value in a form field (4)
Keep in mind that when editing a Database record, the existing values will be overwritten.
If the selected ID does not exist, you will be able to add the data as a new record, by selecting the Insert record if it does not exist box.
Get record
With the Get Record action you will be able to search within a Database and save the values into the form fields.
Add an optional title to identify the action easily (1)
Select the Database where the record you want to edit is stored (2)
In the Filter tab, you must select the column to be filtered and the value to search. The value can come from a form field or it can be set as a default value (3)
The service will return the values of the columns of the record that matches the filter, and you can save it in your form by setting the target fields in Output tab (4)
If the filter matches with more than one record, only the first record will be returned. To avoid unwanted behaviors, we recommend filtering by a unique value column (For example: ID)
Integration with Process Instances
Flokzu also allows you to perform actions on your process instances. With this integration you will have three operations available:
Create a new process instance
Edit an existing instance
Get an existing instance data
New process instance
You will be able to automatically create a new instance just with a simple service call. To do so, follow these steps:
Add an optional title to identify the action easily (1)
Select the process you want to create (2)
In Input tab you will be able to choose the fields that will be loaded. The value can come from a form field or it can be set as a default value for every process instance (3)
The service will return the identifier of the created instance and it's initiation date. You can optionally save it in your form setting the target field in Output tab (4)
We do not recommend placing this service call immediately after the Start Event unless you are sure that it does not cause loops. For more information, refer to the "Avoid these issues" section.
Edit instance
This action allows you to automatically update a process instance by calling the action in the workflow.
Remember that you can only modify ACTIVE instances, that is, those that have not yet finished.
With this action you will not be able to modify the same instance that is running. In that case you should use the ECHO service from the Flokzu Public API. Refer to the following examples for how to add a creation date, completion date or labels automatically.
Add an optional title to identify the action easily (1)
Select the process of the instance you want to edit (2)
In Input tab you must first set the Instance identifier you want to modify. The following parameters will be the target fields and the source value (from a field or it can also be a default value) (3).
This service returns true as output if the instance was successfully updated, or false otherwise. Optionally you can save this data in a form field (4)
Keep in mind that this action overwrites the fields of the selected instance.
Get instance
Get Instance allows you to access data from a certain instance and save it in your form, without modifying any of the source data. Set up the service call as follows:
Add an optional title to identify the action easily (1)
Select the process of the instance you want to get (2)
In Filter tab you must set the Identifier of the instance you want to get, referenced in a form field or by clicking on the pencil icon, you can set a fixed default identifier (3)
In the Output tab you will be able to choose which field of the instance (Output) will be saved in your form (Target Field) (4)
How to integrate with another tenant in Flokzu?
To interact with databases or instances from another tenant in Flokzu, you must call the services from the Public API by setting it up with the data provided by an Administrator.
Avoid these issues
Loop when creating an instance of the same process
When it happens?
It happens if the first task in the workflow is a Service Task that creates a new instance of the same process.
Description
In this case, each instance created could call the service creating a new instance that starts the cycle again, generating a loop.
This behavior is detected by Flokzu, which will show you an error message and will not allow the execution to continue
Loop between two different processes
When it happens?
If your organization has two processes A and B whose first workflow's task creates an instance of the other process.
Description
In this case, the created instance of process A will create an instance of process B which will create another instance of A, generating a loop.
This behavior is also detected by Flokzu, you will recieve an error message and will not be able to continue the execution.
Update process instance through integration with Flokzu services
Recently launched integration with Flokzu services allowing expedite the process of upgrading an instance can review the documentation here.
Flokzu Services Integration
Updated on: 22/09/2021
Thank you!