Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
App Designer is a tool for creating smart forms. It is tightly integrated with the database so that we can create a form corresponding to any table in the database by simply dragging a module and mapping the module to the table or view in the database. Once the module is configured user can simply drag and drop the field to the module and map it to the corresponding column in the table. It has built-in persistence so that the user does not have to worry about writing any code to map data from the form to columns in a database while saving.
App Designer also provides ways of integrating with business processes through the Process button. The User only needs to drag the process button and choose the process to be invoked and the actual integration is taken care of by ONEWEB. Users can also map the parameters to be passed while invoking the process by simply mapping the fields in App Designer to the parameters of the process. For more details on Smart Form Integration with Process please refer to the 6.3.6.1. Smart Form Integration with process section.
App Designer can also be integrated with Microflows through the Microflow interface to provide dynamicity to the forms. Users can configure the event action and choose the microflow to be invoked. Users can also map the parameters to be passed while invoking the microflow by simply mapping the fields in App Designer to the parameters of the microflow and also map the data returned from the microflow to the App Designer fields. For more details on Smart Form Integration with Microflow please refer to the 6.3.6.4. Smart Form Integration with Microflow section.
ONEWEB can easily be integrated with other external systems by means of a visual UI. Developers can integrate with SOAP and REST services, external databases or files without writing any code. It uses simple drag & drop functionality and UI screens for configuration. So from a user perspective, there is almost no difference between integrating to a REST API or a SOAP API.
ONEWEB Platform provides two tools for integration - Microflow Designer and Process Designer. You need to decide which component best suits your application needs. Both tools are similar in their configuration but differ in the intention of use.
Process Designer is used to create Business Processes, which are long-running processes to guide the workflow of the system. Microflow is basically microservices that can be integrated with your UI component for asynchronous requests. For more details on a comparison between both tools please refer section 6.5.3.
Integration to external systems and databases can be time-consuming and implementations are prone to errors. There are multiple integration tools available in the market. But the advantages of using ONEWEB are:
Visual Configuration - ONEWEB provides visual UI tools to configure. Thus, anyone can manage the configuration of integration without writing any code, significantly reducing time and effort and eliminating errors. Shared Integration units - For e.g. if your system needs to connect to a service for currency conversion, once you create an integrated unit to this service, you can call it from any part of your application. Quick Deployment - Once you make changes to a process and click on deploy, the system will deploy it to your runtime environment, and you can start using it. Note: For Microflow, you need to export and manually deploy as of the current version.
Built-in Monitor & Logging - ONEWEB provides built-in monitoring and logging capabilities.
Microflow is one of the tools of ONEWEB that has been developed for the purpose of helping and serving as a medium for facilitating interconnection with other systems; whether it is an internal connection between the ONEWEB components or an external connection.
Integrate with SOAP web services and REST APIs
Microflow Designer provides a Web Service Task for consuming SOAP and REST services. The developer just needs to configure the specifications of the service and ONEWEB will generate the methods and data structures to call the Service.
Integrate with existing databases
ONEWEB supports integrating with SQL Server, Oracle, MySQL, PostgreSQL, DB2 etc. Microflow Designer provides a Database Task to integrate with a database. They provide two types of integration - using JNDI or using JDBC.
Integrating with Excel, CSV, XML or Fixed width files
Microflow supports reading Microsoft Excel, Delimited files, XML files or Fixed Width files. The File Read Task can be used for creating data models and populating them with data from files. ONEWEB can read files from Files System, but also supports reading through FTP, SFTP, and FTPS.
ONEWEB provides a Process Designer tool to develop and execute business processes in an application. The Process Designer tool also provides some nodes to integrate with other systems during a business process flow. The functionality of the node tasks is very similar to the node tasks in the Microflow Designer tool.
Database Node Process Designer provides Database node tasks to communicate with the database, which may be useful if you want to take some of the values from the database during a process. Database node has two types of connection - JNDI and JDBC.
There are four types of commands.
Select: Query to retrieve desired value from the database. You can define the field and table via SQL Command.
Insert: Insert the desired value into the database.
Update: Update values in the database via SQL Command.
Delete: Delete values from the database via SQL Command.
Sub Process Node
In a large process, one process can have a subroutine or another process within. We can collapse the flow as a single flow by means of a Subprocess node.
Web Service Node
Web Services allow access to information from different applications. Process Designer provides a Web Service Task for consuming SOAP and REST services. The developer just needs to configure the specifications of the service and ONEWEB will generate the methods and data structures to call the Service.
SOAP
REST
File Read Node
Process Designer supports reading of Microsoft Excel, Delimited files, XML files or Fixed Width files. The File Read Task can be used for creating data models and populating them with data from files. Process Designer can read files from Files System, but also supports reading through FTP, SFTP, and FTPS. In addition to reading files during a process, Process Designer can also trigger a process to start based on the availability of a file by using the File Input Node.
Microflow is available for use in two ways.
Embedded Microflow. Users can design a microservice using Microflow and then export it as a jar file to use in other systems. Users can import the jar file to their existing java project and use the Microflow Java APIs to call and execute the microservice.
Runtime Microflow Server. Users can also use Microflow as a standalone server mode by installing the Server Runtime and running Microflow through the Web service. In this case, the Microflow is available as a service, and the user can call and execute the microservice using the REST APIs.
Synchronous operation is a blocking operation as a process will wait until the operation completes. But an asynchronous operation is non-blocking as it only initiates the operation. An asynchronous operation allows more parallelism. Since the operation do not block the process, it can do some other computation while the operation is under progress.
A process flow is designed more as an asynchronous process and 'the submit' from a process button will initiate the business process, but the form need not wait for the business process to complete. Also, most processes take days to complete and hence it is pointless to wait for a process to complete.
A Microflow can be designed as synchronous process where the system will wait for the data to be returned from a Microflow or as an asynchronous process where the user can continue to work on the screen while the system will compute in the background and update screen with the result. When using microflow, user can use screen blocking feature to make the call a synchronous or an asynchronous operation.
Microflow is one of the components of ONEWEB that is developed for the purpose of facilitating interconnection with other systems. It can be an internal connection between different ONEWEB components or an external connection with external systems. It can connect to external systems via REST or SOAP API.
Process activity is the core of a Process Template Diagram. It consists of all notations that is used to represent any business activity. In Process Designer, Process activity is also called a Node task. The node task panel is divided into 4 main node task groups as described below:
Activity Tasks: This notation is used to perform a specified task according to the functionality as defined below.
Notation
Notation name
Notation Definition
Java Task
Java Task is used to execute any custom java functions from the uploaded java library.
Database Task
Database Task is used to execute the SQL commands like SELECT, INSERT, UPDATE and DELETE.
Web Service Task
Web Service Task is used to call the SOAP Web service or REST API.
Sub Flow Task
Sub Flow Task is used to call another flow in the same project.
Push Notification
Push Notification Task is used to send notification to mobile application.
Gateway Tasks: Gateway Tasks are used to make decisions to control the Process Path flow. User can specify a condition to determine the path the process needs to follow. The Gateway Tasks help users to fork the process flow into divergent paths.
Notation
Notation name
Notation Definition
Exclusive
Exclusive Gateway is used to create alternative paths within the flow, depending on condition, where only one of the several paths can be followed. The user can enter a condition into each path. If there is more than one path that can be fired or taken, only the first of the valid paths will be fired.
Event notation: Event notation is suitable for events that are triggered. For example, the incoming message from an external system. They can be used to start or finish a process. There are several event types supported by Process Designer.
Notation
Notation name
Notation Definition
Start event
Start Event is used to start the flow.
End event
End Event is used to indicate end of the flow.
Boundary event notation: This notation is used as a listener event on the Activity task notation.
For more details of these groups are explained in table below.
Notation
Notation name
Notation Definition
Timer
Timer boundary event is used as a trigger to execute another node task based on the defined maximum time duration.
Error
Error event is a trigger event to execute another node task based on the defined error or exception.
Properties of Task Activity
The first property of every activity node is by default the General Tab as shown in figure below. The General Tab is used to show the generic information of each node task and it is displayed when user double clicks on any node task.
All property settings available inside general tab are described in table below
Property
Mandatory
Default
Description
Name
Y
N
The name of node task
ID
Y
Y
The unique id of node task is generated by system
Type
Y
Y
The type of node task
Description
N
N
The description of node task
Microflow has many nodes that have been developed to support integration such as
Database Node Microflow can communicate with the database, which may be useful if you want to retrieve some values from the database. It can also be used to insert, update or delete data from the database. This integration can be done through the database node, which supports two types of connection - JNDI and JDBC. It also supports four types of commands -
Select- to retrieve desired data from the database
Insert - to insert the desired data into the database
Update - to update values in the database
Delete - to delete data from the database. You can define the field and table via SQL Command
Sub Process Node In a large process, one process can have a subroutine or another process within. Of course, there must be complex work, and in some cases, there may be duplicate functions. Instead of drawing the same flow at several points, the user can collapse the flow into a simpler flow by using the Subprocess node.
Web Service Node Web Services is a software system that has been designed to support the exchange of information. Microflow Designer provides a Web Service Node for consuming SOAP and REST services. The developer just needs to configure the specifications of the service and ONEWEB will generate the methods and data structures to call the Service.
SOAP
REST
File Read Node Microflow can read data on file systems using the File Read Node. It supports files like excel, XML, Delimited, and fixed-width files. In the FileRead Node user can also configure actions on success and failures.
Data Mapping is an integral part of system integration as you need to map input and output parameters to transfer data from one component to another. ONEWEB provides a simple UI for mapping parameters between components.
Data Mapping from Smart Form to Microflow ONEWEB provides a simple drag-drop UI to map parameters from the Smart form fields to the process parameters of the Microflow. Users can click on the App Designer Parameter and then drag and drop to the process parameter to map the value while calling the microflow. Similarly, users can click on the response tab and map the output process parameters returned from Microflow to the UI fields on the Smart Form.
Data Mapping within different nodes in Microflow ONEWEB provides a simple mapping parameter screen to map parameters from the process to the Activities within each node.
The data mapping discussed in Section Data Mapping, it is a data-level mapping between inbound and outbound parameters. But this section refers to the data transformation while mapping. Double click on the blue line connecting the parameters to open the formula editor panel to create the data transformation logic.
On the Formula Editor panel, the user can drag different process parameters and mathematical operators, and String functions to create the condition. These String functions are available on the Formula editor only on the mapping screen.
Microflow is designed to be a medium for integrating multiple systems. The built-in tool itself has a number of helper nodes. It also provides a Java node to execute any custom logic needed by the application. Add custom logic to Microflow To add custom logic simply create a microflow and add the java node to it. The developer can implement the custom logic in java and export it as a jar file. Once you have the jar file you can upload it to the microflow java node and specify the class and method to be invoked from a microflow. Users can also map the data from microflow to the java class and back. Please remember to upload any dependent jar files independently to the flow using the upload jar file utility.
The below section explains the steps to configure the Java node
Drag and drop the Java node activity to the diagram panel Choose the Jar file that you want to execute in ‘Jar Name’ or select from an existing list of uploaded jars Click on Get Class Name and choose the custom java class name in the ‘Class Name’ field Select the desired method to be called in ‘Method Name’ Click Open Mapping Parameter to map the parameters to the java method and the data returned from java to the process parameter. Click ‘Done’ to save your java node setting
Use the Web Service task to call a Rest API or a Soap Service.
Web Service task is used to call external web services using REST API or SOAP Service.
Web Service Task Configuration panel have 4 tabs to define properties.
General Tab contains general information such as title, task id, description etc.
Used to configure and map the Business Object for input and output for the node.
The values for Setting are as follows.
SOAP
When SOAP is selected as Web Service Type, user must enter the information about calling the Soap Service in the SOAP panel.
SOAP panel has a "Choose WSDL" button to upload WSDL file or a "Choose XSD" button to upload XSD file. Once the user chooses a WSDL or XSD, user can click the Get Operation button to get all possible operations from the SOAP service. Get Endpoint button is to get End Point from SOAP Service.
REST
When REST is selected as the Web Service Type, user must enter information about calling the Rest API on REST panel.
Both SOAP and REST tabs contain an "Open Mapping Parameter" button. Clicking on "Open Mapping parameter" button redirects user to Mapping Parameter screen where user can click on Mapping Parameter Input line or Mapping Parameter Output line to map parameters for this Web Service task.
You can map the input parameter and output parameter of SOAP service using XPath mapping. Please refer below example of sample wsdl.
Now to map the xpath for each input parameter.
For field name "title" you have to create xpath for mapping parameter as follows.
Method 1:
Parameter Name : title
XPath : /Operation_in/book/title
Parameter Type : String
Method 2:
Parameter Name : title
XPath : //book/title
Parameter Type : String
Method 3:
Parameter Name : title
XPath : //title
Parameter Type : String
XPath Syntax expression
Add Row button is used to add more header key value to the REST service. Trash icon on right side is to remove any existing header rows.
Property
Mandatory
Default
Description
Web Service Type
Yes
SOAP
To choose the type of web service. There are 2 types as following: SOAP and REST.
Property
Mandatory
Default
Description
Source Type
Y
Url
User can choose to get WSDL definition from URL or File
use environment
N
Unchecked
If user chooses use environment checkbox, then system will display the list of environment variables for user to choose. User can set the WSDL URL in the environment variable setup screen and choose the variable in the configuration panel.
WSDL URL
Y, when SOAP using URL.
If user chooses Url as Source Type, WSDL URL is the URL to the WSDL File location. If user chooses use environment then select the environment variable corresponding to WSDL URL.
WSDL File
Y, SOAP using WSDL File
If user chooses File as Source Type, WSDL File for Web Service to be called.
XSD File
N
If user chooses File as Source Type, Subject of WSDL file.
Operation
Y
The operation is method to be called of that service.
End Point
Y
The endpoint is the URL where that service can be accessed by a client application.
Authentication
N
Authentication credentials for HTTP authentication.
Username
N
Username for Authentication. If user chooses use environment then select the environment variable corresponding to username.
Password
N
Password for Authentication. If user chooses use environment then select the environment variable corresponding to password.
Property
Mandatory
Default
Description
use environment
N
Unchecked
If user chooses use environment checkbox, then system will display the list of for user to choose. User can set the REST URL in the environment variable setup screen and choose the variable in the configuration panel.
REST URL
Y
URL for calling Rest API. If user chooses use environment then select the environment variable corresponding to REST URL.
Http Type
Y
Operations to HTTP requests.
Accept Header
Y
Type of text that the Rest API accepts.
Content Type
Y
A Content Type is a set of text response when calling Rest API.
Authentication
N
Authentication credentials for HTTP authentication. User can choose between Basic & IAM2
Username
N
If user chooses Authentication as Basic, Username for Authentication.
Password
N
If user chooses Authentication as Basic, Password for Authentication.
Header - Key
N
Additional header information key.If user chooses use environment then select the environment variable corresponding to KEY.
Header - Value
N
Additional header information value. If user chooses use environment then select the environment variable corresponding to Value.
Expression
Description
nodename
Selects all nodes with the name “nodename“.
/
Selects from the root node.
//
Selects nodes in the document from the current node that match the selection no matter where they are.
.
Selects the current node.
..
Selects the parent of the current node.
@
Selects attributes.
nodename[index]
Selects the index of element.
Integration is a key part of building large enterprise applications. Follow the given best practices while integrating your application using ONEWEB.
Choose the best tool as per your application's requirements. Use Process Designer only for integrating to workflow.
Use Microflow to integrate into any other component or service.
Design each microflow using the single responsibility model. It allows easy maintenance.
Use sub-flows for reusing the microflow.
Define the microflow name and business objects in advance during the design phase itself.
Use environment variables to configure the activities for different environments. This prevents changing the configurations later when deploying to the test or production environments.
Separate dependency jar files from the Jar file created for the Java node and upload them to the server using the upload file menu. This allows the admin to control the versions of each utility jar file especially when there are common utilities involved.
Process Designer and Microflow Designer are tools in the ONEWEB to integrate with other modules or systems. The Process Designer is used to design and create business process and Microflow Designer to design Microflow. Process flows and Microflow are quite similar. The difference is in their intended usage.
Microflow
Process
Used to create Micro Services
Creates Business Processes or workflows.
Has a single shot execution
Executed in multiple stages
Short running
Long Running and can extend to days or weeks.
Suited for both Synchronous and Asynchronous calls
Better suited for synchronous process executions like - Initiate business process
Have both embedded mode and standalone server
Has only standalone server.
How to start working with Microflow in ONEWEB
In this section, we will learn how to create a Microflow from scratch. First user needs to create an application from AppSpace or open an existing application in AppSpace. The user can then create a Microflow inside the Application. Once the Microflow is created and the necessary permissions generated, AppSpace will redirect you to the Microflow Designer to design the flow.
We will show how to create the application and create a flow in the application and also how to simulate and also deploy this microflow to a real environment.
Export Microflow jar
Once you complete designing the Microflow, you can export it to be used on your local server. There are two ways of exporting Microflow to copy to app server for using it.
Embedded mode
Standalone Server mode
The exported format is different for the two modes. Let us see how we can use Microflow in both types.
When you choose standalone server mode, there is no separate deployment file as the Microflow is activated on the server as a REST Service and you can access it directly through the REST APIs.
Use the Java Task to call custom java functions.
The Java Task is used to call and execute Java code defined by user. The Java node task is needed when user wants to use Java code inside their microflow. To accomplish this user can create the Java method, export the Java class to a Jar file and then upload this Jar file to the Java Node Task for executing Java method during the flow. You can upload any jar file and call a function from that jar file using the Java Task.
Java Node Configuration panel has 3 tabs to define properties.
General
General Tab contains general information such as title, task id etc.
Business Object
Used to configure and map the Business Object for input and output for the node.
Java Parameter
Property
Mandatory
Default
Description
Jar Name
Y
The jar file. The value can be set by clicking on the Choose Jar button and choosing the jar file using the folder browser. Alternately the user can select from the list of existing jar files as well.
Class Name
Y
The fully qualified class name. The system will display all the available classes from jar on clicking the "Get Class Name" button. User can then choose the value from the list.
Method Name
Y
The method to be called from the class. System will display all the eligible methods from the chosen class. User can select the method from the list
In Java Parameter tab, "Choose Jar" button is used to upload Jar file and "Get Class Name" button is used to get class name from Jar file.
Use exclusive gateways to direct your process flows to one or more paths based on condition.
Gateway Nodes are used to branch a process flow based on conditions and is represented with a diamond shaped box.
Exclusive gateway is the type of gateway where the process will follow only the one path where the condition is evaluated to be true. Exclusive gateway is used to create the condition flows in a business process.
Gateway Configuration panel has two tabs to define properties:
General Tab contains general information such as title, task id etc.
Property
Mandatory
Default
Description
Gateway Type
Y
There is only 1 Gateway available to choose for Microflow: Exclusive.
When link paths are created from Exclusive gateways, user must specify the condition on the links coming out of the Gateway Parameter panel.
Property
Mandatory
Default
Description
Name
N
User can give name to the link for easy reference. E.g. Approve, Reject etc.
Type
Y
Exclusive
To define the type of Gateway.
Description
N
To describe the gateway condition.
Condition button on Gateway Parameter Tab redirects user to the Formula Editor panel where user can write new conditions or can edit existing conditions.
Use the Database Task to execute database commands.
The Database Task is used to execute database commands. Most Microflows rely on some information from database to execute jobs or complete the flows. They may often require to Select, Insert, Update or Delete data from database, and pass such values to other nodes to complete the flow. Microflow Designer provides this functionality using Database Node tasks.
Database Node Configuration settings panel has 3 tabs to define properties.
General
General Tab contains general information such as title, task id etc.
Business Object
Used to configure and map the Business Object for input and output for the node.
Database Parameter
Property
Mandatory
Default
Description
Configured by
Y
To define configured. There are 2 types: Process Designer this config is mean user need to config by self and Data designer is mean user use config from sql-builder
Connection type
Y
To define the type of database connection. There are 2 types: JNDI and JDBC.
Command Type
Y
To define the type of database command used. There are 4 options as following: Select, Insert, Update and Delete.
Command
Y
To define the SQL command to be executed in database.
Java Naming and Directory Interface (JNDI) is a directory service that allows Java software clients to connect database via a name. When "Connection type" is selected as "JNDI", user must enter JNDI Name.
Property
Mandatory
Default
Description
use environment
N
Unchecked
If user chooses use environment checkbox, then system will display the list of environment variables for user to choose. User can set the JNDI Name in the environment variable setup screen and choose the variable in the configuration panel.
JNDI Name
Y
Name of JNDI for database connection. If user chooses use environment then select the environment variable corresponding to JNDI Name.
Java Database Connectivity (JDBC) is standard application programming interface, which defines how a client may access a database. It is Java based data access technology and used for Java database connectivity. When "JDBC" is selected as "Connection type". User must also enter value for JDBC.
Property
Mandatory
Default
Description
JDBC Database Driver
Y
The class name of the database driver for database connection.
use environment
N
Unchecked
If user chooses use environment checkbox, then system will display the list of environment variables for user to choose. User can set the JDBC URL in the environment variable setup screen and choose the variable in the configuration panel
JDBC URL
Y
To set the address of database for connecting database. If user chooses use environment then select the environment variable corresponding to JDBC URL.
JDBC Username
Y
Username for Authentication. If user chooses use environment then select the environment variable corresponding to JDBC UserName.
JDBC Password
Y
Password for Authentication. If user chooses use environment then select the environment variable corresponding to JDBC Password.
In Database Parameter tab, "Open Mapping Parameter" button is used to map parameters of Database Node task. When click Open Mapping Parameter button, the system will redirect user to Mapping Parameter screen and then user can click Mapping Parameter Input line or Mapping Parameter Output line to mapping parameter for this Database Task.
Use Timer Events to determine the maximum time allowed for processing a task.
Timer events are used to specify the upper time limit for processing a task. It can be used as a start event, intermediate event or boundary event. When a timer attached task goes over time, it allows the flow to perform some action.
For Example, let's say a flow is calling an external web service, which is being monitored by Timer event. If the task is not taken care of or completed as per scheduled, then Timer event can be used to send an email to system admin/ responsible person to check on the service.
Timer Configuration panel has only one tab to define properties:
Timer
Property
Mandatory
Default
Description
Time Duration
Y
0
To specify the maximum time duration for a task.
Time Unit
Y
Type of time unit.
Terminate
N
Uncheck
Select checkbox if you want that task to terminate on exceeding time.
Use the Sub Flow node to call another microflow.
The Sub Flow node is used to call other microflows from within the main flow. If there is a section of the main flow that can stand alone, it is good practice to implement it as a separate microflow. Now you can call this flow from the main flow using the Sub Flow node. This improves clarity and reusability.
Sub Flow Node Configuration panel has 3 tabs to define properties.
General
General Tab contains general information such as title, task id etc.
Business Object
Used to configure and map the Business Object for input and output for the node.
Sub Flow
Property
Mandatory
Default
Description
Flow Name
Yes
Choose the flow that you want to use as a sub flow in your main flow.
In Sub Flow tab, "Open Sub flow" button is used to open or edit the sub flow. "Open Mapping Parameter" button is used to map parameters to the sub flow. When click on Open Mapping Parameter button, the system will redirect user to Mapping Parameter screen and then user can click Mapping Parameter Input line or Mapping Parameter Output line to map parameters for this task.
Use Error Events to handle exceptions or errors in a process by doing some action.
Error Events are used to handle the occurrence of errors during the execution of a certain task in the flow. For example, let's say if a Java Task is executed with errors, user can use Error Event to send an error message.
Error Configuration panel settings has one tab to define properties.
Error
Property
Mandatory
Default
Description
Exception
Yes
The type of exception to be handled.
In Error tab, "Add Exception Row" button to add more exceptions, "Delete" button to remove an existing exception. "Open Mapping Parameter" button is used to map parameters of exception node task. When click Open Mapping Parameter button, then the system will redirect user to Mapping Parameter screen and the user can click Mapping Parameter Input line or Mapping Parameter Output line to set mapping parameter for this Error Event Task.
Use the Push Notification task to send message to mobile application.
Push Notification task is used to call push-notification hub to send message to mobile applications using Android or iOS platform.
Push Notification Task Configuration panel have 3 tabs to define properties.
General
General Tab contains general information such as title name, task id, description etc.
BusinessObject
Used to configure and map the Business Object for input and output for the node.
Push Notification
Property
Mandatory
Default
Description
Application Name
Y
The name of the mobile application that is to be send message.
use environment
N
Unchecked
If user chooses use environment checkbox, then system will display the list of environment variables for user to choose. User can set the Node URL in the environment variable setup screen and choose the variable in the configuration panel.
Node Url
Y
URL for calling the push-notification hub. If user chooses 'use environment' then select the environment variable corresponding to Node URL.
Android Platform
Y, when use Android platform.
Off
To use the android platform. There are 2 options: On and Off.
iOS Platform
Y, when use iOS platform.
Off
To use the iOS platform. There are 2 options: On and Off.
You can use both platform in a single Push Notification Node.
The values for Settings are as follows.
Android Platform
When Android Platform is selected as the Platform Type, user must enter the information for calling the push notification for android in the Android Platform panel.
Property
Mandatory
Default
Description
Collapse Key
N
To provide collapse key to mark a message as collapsible. A collapsible message is a message that may be replaced by a new message if it has yet to be delivered to the device. It is used in apps where only the most recent message is relevant.
Package Name
Y
To define package name of mobile application.
Priority
Y
To define the priority of push-notification. There are 2 options -High and Normal.
High is used to wake a sleeping device when necessary and to run some limited processing.
Normal is set. When the device is in Doze, delivery may be delayed.
Server Key
Y
A server key that authorizes the mobile application to access Google services.You can get the server key when you create your Firebase project and register your mobile application.
iOS Platform
When iOS Platform is selected as the Platform Type, user must enter information for calling the push-notification for iOS in the iOS Platform panel.
Property
Mandatory
Default
Description
Package Name
Y
To define package name of mobile application.
Production Cert File
Y
Production Certificate file for an iOS application.
Production Key File
Y
Production Private Key file for an iOS application.
Password for Production
Y
Password for Authentication of production-cert file and production-key file.
Dev Cert File
Y
Develop Certificate file for an iOS application.
Dev Key File
Y
Develop Private key file for an iOS application.
Password for Dev
Y
Password for Authentication of dev-cert file and dev-key file.
Is Production?
Y
Yes
To define if use production values of push-notification. There are 2 options: Yes and No.
Upload button is used to upload certificate file and private key for production or development environment.
Both Android and iOS tabs contain an "Open Mapping Parameter" button. Clicking on "Open Mapping parameter" button redirects user to Mapping Parameter screen where user can click on Mapping Parameter Input line or Mapping Parameter Output line to map parameters for this Push Notification task.
Step 1: Click “Export Embedded Microflow” under "Choose Export" on the top right of the screen.
Step 2: Enter the name for the file to be saved in “File name” and click “Export”
Your Microflow will be downloaded as a Jar file and you can copy your Microflow to another java project and use it in embedded mode.
How to create a Microflow in ONEWEB?
To create a microflow, the user needs to create an application or open an existing application in AppSpace.
Create an Application on AppSpace. To create an application on AppSpace first log in to AppSpace and click on the Create new app button.
When creating an application, users can create it as a Web Application or a Mobile App. Choose the right platform for your application and enter the details.
Click on Create button. The new application is created for you now. Click on the application icon to open your app. The system will redirect the user to the components page.
On the home page of the application, user can click on Create Flows icon. Alternately, user can create a new Microflow from the Component list screen as well. Click on the 'Add New' option.
On the Create Microflow dialog, enter the flow details. Users can click on Create button to simply create an empty microflow and can choose to start designing later. Alternately, the user can click on the Start Design button to create the flow and to start designing now itself.
If the user chooses to click on Create. The system will create the microflow and display the list of components to the user. Users can later click on the edit icon to start working on the microflow.
If the user clicks on the Start Design button, the system will create a microflow and redirect the user to the Microflow Designer. The system will now display the Create Flow page for creating the Flow Diagram.
If the user is creating a microflow for the first time, the system will redirect user to the defined BO page.
Define the Business Object step. Users can create the input and output parameters of the process.
User can add further details to the BO by clicking on the Add Parameter icon on the BO and add the parameters inside the BO.
The system will now display the Create Flow page for creating the Flow Diagram. Users can now start designing their flow diagram here.
Create the flow diagram to implement the logic.
Now let us create the actual microflow logic in the Flow Diagram
1. Drag Start node under EVENT tab and drop in the diagram panel
2. Drag Database node under ACTIVITY tab and drop in the space next to start node
3. Double click on the database node and the configuration panel will be shown at the bottom of the screen.
In tab General enter ''RetrieveUserBenefits"
In the tab Business Object click on "Add Row" button For
BenefitBO check input and for BenefitBOout_Avalant check output
NOTE: From Version 4.0.0.19 the parameter mapping is done automatically between the parameters of same BO. User need to manually map only if you need to map to a different business object for input or output. If you have different input and output parameters, map them as given below.
Click "Open Mapping Parameter"
Click on the line between Input and Mapping
Link the parameters for input
Click on the line between Mapping and Output
Link the parameters for output
Now click on Done to close the mapping screen.
Open tab Database Parameter
Choose Connection Type as JNDI
Enter "jdbc/application" in JNDI Name
Choose "Select" for Command Type
Enter "SELECT id, travel_date, project_name, description, amount, status, benefit_type, username FROM oneweb_benefit WHERE benefit_type = ? AND username = ?" in Command
Click "Open Mapping Parameter"
Click on the line between Input and Mapping
Click on DatabaseDummyObject and choose Add Parameter icon
Add the parameters "benefit_type" & "username" and click Submit
Link the activity parameters for input
Click on the line between Mapping and Output
Click on DatabaseDummyObject and choose Add Parameter icon
Add the parameters for output and click Submit
Link the activity parameters for output
Now click on Done to close the mapping screen
Click Done on the database node configuration panel to close the panel
4. Drag END node under EVENT tab and drop-in space next to the database node
5. Drag line and connect the nodes 6. Click "Save"
Now you have your first Microflow service ready for execution
Users can use the validate option to see if all the configurations are complete
Users can choose from an existing BO in the system by clicking on Add existing business object icon or user can create a new BO by clicking on the Add parameter icon . Enter the details for the new BO on the Parameter dialog
Suppose you need to update some data to the database from the page or show some data from another system, you need to integrate Page with Microflow. Assume we need to show data such as exchange rate from the Fixer.io website to be shown dynamically on the Page. For this, we can use the Web Service Node in Microflow (REST or SOAP) to get data from the website and integrate it with Page Designer.
Microflow Designer (MFD) allows the microflow to be exported from one application and imported to another application in order to replicate or reuse the microflow. The microflow can even be imported to a completely different environment as well.
Export To export any microflow, there is the "Export" option under the Project Overview screen as shown in the below figure.
Users will have 3 options - Config, Embedded, MicroService.
Config - Export the microflow configurations so that it can be imported to another application.
Embedded - The microflow jar file is used by the Microflow runtime. To copy it to a sit or production environment.
Microservice - To export it as a service to be hosted in that environment.
The user also has the option to choose the microflow that needs to be exported. Users can choose one or more microflows to be exported.
If the user selects the Config option, there are two types of export operations available under Export Config.
Export only configuration
Export configuration along with attached artifacts like jar files (for Java nodes), or wsdl files (Web Service nodes).
The user has the option to choose what to export. Users can choose the Only Config option to export only the microflow configuration or With File option to export the attached jar files and other artifacts.
The exported file is then shown to download and saved to the user's machine. This file contains the entire flow & business objects in JSON format along with the artifacts depending on the option chosen.
Import To import a microflow, there is the Import button on the Project information screen as shown in the below figure.
With the click of this button, the import process dialog is shown. The user has to choose the microflow configuration file by clicking on the "Choose File" button. The system will then show the list of all the available microflows in that file. Users can choose the microflows to be imported to the app. By default, all microflows will be selected.
The user also has the option to import as New or Overwrite existing flow. If the user selects the Overwrite option, then he has to select the microflow to be overwritten as well.
Click on the "Import" button and the microflow will be imported to the application. Once the microflow is imported completely, the user can see all the microflows listed under the Flow Name section as well as in the menu.
In most enterprise applications to make the UI dynamic, it needs to be integrated with the back-end server to provide updated information as per user interaction. For example, when the user enters the code zip code, the system can return the name of the province, district, and sub-district from the database. In ONEWEB, Microflow provides the interface for integration.
In this section, we will see how to integrate the Smart Form with database to implement dynamicity on UI using the Microflow
Smart Form Integration using Microflow
1. Go to the App Designer 2. Open your Entity 3. Choose the element which should trigger the action and click on the integrate icon . (This icon is available on all the fields and all buttons)
5. ON Microflow Configuration Window select "change()" in Event and click on the Microflow button Select "Your Project Name" in Project Select "Your Flow Name" in Microflow Select "Y" in Async ('Y' for asynchronous call and 'N' for synchronous)
6. Map Entity Parameters to Flow Parameters.
7. Click on the Response tab and map the output parameters from Microflow to the Entity parameters
8. Click OK and Save Entity. You have successfully integrated your Smart Form into the Microflow.
Now when you open the form in Runtime and click on the button, it will call the microflow.
Page can be integrated with other internal and external systems like databases or web services using Microflow to create dynamic web pages on ONEWEB. This section shows you how to call a Microflow Service from Page, and also to display the data returned by the service on the Page.
Page to call Microflow Go to the Page Designer and open the Page that you want to make dynamic.
1. Click on the input field to be passed to Microflow while calling
4. Select the State parameter to connect (Microflow mapping allows only state parameters to be mapped to the microflow input parameter. Hence to pass a parameter to microflow user needs to map the input field to State)
5. Click on the element or container which initiates the call to your microflow (1). In this example, we call the microflow at the click of a button.
Click on the Add icon under Action
Select "click" in Event
Select "Microflow" in the tabs
Click Refresh to reload the available services.
Select "Your Project Name" in Microflow project name
Select "Your process Name" in Microflow process name
8. Map the Page Designer parameter to the Microflow Parameter. Remember to Save mapping by clicking on the Save icon on the mapping screen.
9. User can hook and add JavaScript functions before and after the microflow call.
10. User can also redirect to another page on the success of the call.
Update data on Page from Microflow
1. Select an object on a page which displays the data coming from service
4. Select the field name and click Connect.
5. Click Done on the Connect to Data dialog.
Now the page is successfully integrated with the Microflow and can show the retrieved data on the screen.
Once the microflow is complete and validated successfully, the user might want to test to see if the flow is working as expected. For this ONEWEB provides the Simulator Utility to simulate the flow.
To simulate a flow, go to the Simulation Test tab. The utility provides the flow diagram for review and an input box with the input BO parameters in JSON format to start the flow. 1. Update the Input BO parameters with the actual value you need to send to test the flow. 2. Click on the Start button.
The system will trigger the flow with the sample values and display the value returned from the microflow in the output box.
If a user updates the flow or the business object on the flow, the user needs to click on the Refresh Cache button to reload the microflow for simulation. Users can click on the Retest button to test the flow with new values.
From ONEWEB version 4.0.19.12, users can use JSON path syntax to retrieve data from REST services with complex JSON structures. For more information on JSON path syntax please check the site https://support.smartbear.com/alertsite/docs/monitors/api/endpoint/jsonpath.html.
Users can use this syntax on the output mapping screen for REST services under the RestDummyObject.
Users can use online JSON path evaluators to find the JSON expression to be used to retrieve a particular data from the JSON structure. There are multiple evaluators available online. For e.g. https://jsonpath.com/.
With version 4.0.19.10 ONEWEB provides a very powerful feature to create custom activity nodes and use these custom nodes in your microflow or share them with other users. These custom nodes are called extensions. These extensions can be a simple node to query your internal database, or a complicated proprietary node to connect to a blockchain server as well. Users can create the extension once and then use it in every application by installing the extension to the application. Users can also share their extensions with other ONEWEB users. Once the ONEWEB MarketPlace is up, users can even sell their extensions in the MarketPlace.
Please Note: The process to create an extension is the same in both Process Designer as well as Microflow Designer. So please follow the details on how to create and install extensions as given in Section Custom Extensions. Once an extension jar is built, the same jar can be installed on both Process Designer and Microflow Designer.
Once the custom extension is installed on an application in Microflow, users can use the extension node just like any other activity node in Microflow by simply dragging and dropping the node to the canvas and configuring the properties.
The business processes may include database nodes or web service nodes to interact with databases or other services. But these database configurations and web service URLs may be different for different environments. For e.g. the JDBC URL for the development database will be different from the value for the test environment and will again be different for the production database.
So, from version 4.0.0.19 ONEWEB provides an option to configure the environment parameters as variables for the different environments. Users can then use these variables while configuring the flow. This makes it easier to deploy the process to different environments without modifying the process diagram every time.
How to create Environment variables in Process To set up environment parameters for an application, go to the environment setup screen inside the application. Click on the Add Environment icon.
You can create different environments for your app here.
Users can also create multiple profiles for each environment on the profile tab.
Finally, the user can create the environment variables for each parameter
Then users can create them for other environments too
How to use these Environment variables in Process You can use these variables in your node configurations. For e.g., in the database node configuration. For configurations which allow environment variables you can see a check box use environment. Use can select it to use value from environment configuration.
ONEWEB has the option to support multiple languages on its designers. Currently, it supports English, Thai & Japanese. To switch the language on the designer, go to the language switch icon on the bottom left panel on Microflow Designer.
ONEWEB from version 4.0.19.11 supports custom extensions for Process and Microflow. There are some custom extensions provided by ONEWEB along with the platform. One such available extension bundled with ONEWEB is the Excel Reader extension. It can be used to read data from Excel files.
To read data using Excel Reader, the user needs to first install the extension to their application. Please follow the steps as described in section 6.4.16. to install and enable the Excel Reader to your application. Once the extension is installed and enabled, you can use it just like any other node in the diagram palette.
Users can configure the properties for reading the file as shown below. The File Source can be the File System or network, allowing for FTP options like FTP, SFTP & FTPS. Users can enter the source and file details directly or even get the data from the Business Object as shown in the example below.
Users can read data from multiple sheets by mapping the input the data passed to the Reader
The data can be read from a specific column on excel as shown under the specific Field parameter or can read entire rows as configured under the records parameter under each individual sheet.
Use the Push Notification task to send message to mobile application.
Purpose
Push Notification task is used to call push-notification hub to send message to mobile applications using Android or iOS platform.
Push Notification Node Configuration Properties
Push Notification Task Configuration panel have 3 tabs to define properties.
General
General Tab contains general information such as title name, task id, description etc.
BusinessObject
Used to configure and map the Business Object for input and output for the node.
Push Notification
Property
Mandatory
Default
Description
Application Name
Y
The name of the mobile application that is to be send message.
use environment
N
Unchecked
If user chooses use environment checkbox, then system will display the list of environment variables for user to choose. User can set the Node URL in the environment variable setup screen and choose the variable in the configuration panel.
Node Url
Y
URL for calling the push-notification hub. If user chooses use environment then select the environment variable corresponding to Node URL.
Android Platform
Y, when use Android platform.
Off
To use the android platform. There are 2 options: On and Off.
iOS Platform
Y, when use iOS platform.
Off
To use the iOS platform. There are 2 options: On and Off.
You can use both platform in a single Push Notification Node.
The values for Settings are as follows.
Android Platform
When Android Platform is selected as the Platform Type, user must enter the information for calling the push notification for android in the Android Platform panel.
Property
Mandatory
Default
Description
Collapse Key
N
To provide collapse key to mark a message as collapsible. A collapsible message is a message that may be replaced by a new message if it has yet to be delivered to the device. It is used in apps where only the most recent message is relevant.
Package Name
Y
To define package name of mobile application.
Priority
Y
To define the priority of push-notification. There are 2 options -High and Normal.
High is used to wake a sleeping device when necessary and to run some limited processing.
Normal is set. When the device is in Doze, delivery may be delayed.
Server Key
Y
A server key that authorizes the mobile application to access Google services.You can get the server key when you create your Firebase project and register your mobile application.
iOS Platform
When the iOS Platform is selected as the Platform Type, the user must enter information for calling the push notification for iOS in the iOS Platform panel.
Property
Mandatory
Default
Description
Package Name
Y
To define package name of mobile application.
Production Cert File
Y
Production Certificate file for an iOS application.
Production Key File
Y
Production Private Key file for an iOS application.
Password for Production
Y
Password for Authentication of production-cert file and production-key file.
Dev Cert File
Y
Develop Certificate file for an iOS application.
Dev Key File
Y
Develop Private key file for an iOS application.
Password for Dev
Y
Password for Authentication of dev-cert file and dev-key file.
Is Production?
Y
Yes
To define if use production values of push-notification. There are 2 options: Yes and No.
The upload button is used to upload the certificate file and private key for the production or development environment.
Both Android and iOS tabs contain an "Open Mapping Parameter" button. Clicking on the "Open Mapping parameter" button redirects the user to the Mapping Parameter screen where the user can click on the Mapping Parameter Input line or Mapping Parameter Output line to map parameters for this Push Notification task.
Step 1- configure entity to get data by REST API. For this example, we will prepare entity named Work Order. This Entity includes 3 Tabs and 4 Modules. See picture below.
Step 2 - Get Key Data to send parameters into the URL. The image below is the Update Screen of Work Order. For this example, the key is sale_order_no and the value is 0000000010.
Step 4 - Call URL to get data from Entity. The Format is ServerName, Port, Context
Root and Parameter Value.
Format: ServerName:Port/Context Root/Parameter Value
Step 5 - Set the following 3 Header parameters as shown below.
Content-Type: application/json
Authorization: Start value Bearer then space and token id received from login process.
clientId: use clientId same as in login process.
Step 6 - Run Step 3 and Step 4 to get result JSON DATA as in picture below
JSON Data contains following fields.
ENTITY_ID value of entityID
MODULE_ID value of moduleID
UPDATE is process mode
SALE_ORDER_ITEM is table name
PRODUCT_ID, PRODUCT_NAME etc. is field name
KEY is the key of module/record In this Data will see ModuleID 4 value which is same with configuration of this entity.
You already saw how to get data from entity. Now assume another application need to find customer contact from Order No. You can get the information by REST API.
Step 1 - In the Login Screen enter the userName value and call Login REST.
Step 2 - Use Ajax to call Rest Service to keep id_token into session for use by other processes.
Step 3 - Prepare Screen to Input Order No.
Step 4 - Input value Order No, then click Find Customer contact.
Step 5 - use the JavaScript function to call Ajax REST API to get Data Customer contact by passing parameter Order No. In headers set Content-Type, Authorization (use id_token from the session), and clientId from the login process.
Step 6 - call REST API and get JSON DATA. The highlighting module has CUST_CONTACT which need result. It can get Data from JSONObject through MODULE_ID > UPDATE > SALE_ORDER_DELIVERY > CUST_CONTACT.
Step 7 - Use JQuery or JavaScript to Display Result Data.
JavaScript Node extension is another extension provided by ONEWEB along with the platform. It can be used to execute JavaScript code on the data within Business objects.
Similar to the Excel Utility Extensions, to use JavaScript Node Extension, the user needs to first install the extension to their application. Please follow the steps as described in section 6.4.16. to install and enable the JavaScript node to your application. Once the extension is installed and enabled, you can use it just like any other node in the diagram palette.
Users can configure the node to execute the Javascript login in the Extension properties. The user should follow the same function syntax to add the logic inside the Editor window. for e.g. function excute(input) {}
Data mapping for the JavaScript node is as follows. All the BO to be passed to the JavaScript function needs to be added under the input variable as shown below. Users can look up the BO using the lookup option.
The output data from the JavaScript node can be mapped as shown below. The output data will be under the output variable object and the name of the variable will be answered.
In the process flow, the user might need to upload jar files for the Java node or WSDL files for the Webservice node. Instead of uploading the file at the nodes user can upload them to the application using the upload files facility and then select the required file at the nodes. This makes it easier to manage the files or update them without affecting the nodes.
To upload files to an application, go to the upload files menu and upload the required files.
Once the files are uploaded, the user can choose these files from the Java node task or Web services node task and use them in the process flow.
The App Runtime provides a list of REST APIs so that users from other systems can interact with the entities created in App Designer using the REST. This REST API in APP Runtime can be used to insert, update and delete the entity configuration in database. This section gives the details of the methods provided by the APIs. The methods can be added to the context root to call the service.
Validation Node extension is another extension provided by ONEWEB along with the platform. It can be used to validate data within Business objects.
Similar to the Excel Utility Extensions, to validate BO, the user needs to first install the extension to their application. Please follow the steps as described in section 6.4.16. to install and enable the Validation node to your application. Once the extension is installed and enabled, you can use it just like any other node in the diagram palette.
Users can configure the validation to be enforced in the Extension properties. There are two types of Logical Operators possible - OR & AND. Use the gateway as per the output condition required. It will map all the error messages to output.
Data mapping for the validation node is as follows. All the BO to be validated need to be added under the bo Input as shown below. Users can lookup the BO using the lookup option.
The output message from the Validation node can be mapped as shown below.
Excel Writer extension is another extension provided by ONEWEB along with the platform. It can be used to write data to Excel files.
Similar to the Excel Reader Extension, to write data to Excel Files, the user needs to first install the extension to their application. Please follow the steps as described in section 6.4.16. to install and enable the Excel Writer to your application. Once the extension is installed and enabled, you can use it just like any other node in the diagram palette.
Users can configure the properties for writing the file as shown below. The File Destination can be the File System or network, allowing for FTP options like FTP, SFTP & FTPS. Users can enter the directory and file details directly or even get the data from the Business Object as shown in the Excel Reader. There is also an option to transform data to pre-defined formats while writing.
The data can be written to the specific column on excel as shown under the specific Field parameter or can be written as entire rows by configuring under the records parameter. Users can write multiple sheets of data using one Excel Writer.
A REST API breaks down a transaction to create a series of small modules. Each module addresses a particular underlying part of the transaction. This modularity provide developers with a lot of flexibility, but it can be challenging for developers to design from scratch. Currently, Sample use cases for APP Runtime API are Mobile App and Custom App.
Mobile App. Mobile App is an application which communicates with server and mobile over the internet by using REST API.
Example Login Mobile App
Features like Key-in Username & Password, Log on with all case, Forgot Password, Remind me later are all actions from mobile to Server which communicate through internet by REST API.
Custom App.
Custom App is application which communicate with server and web application by using REST API.
Example Work Order
Create Order Item, Search Contact, View Order, Calculate Order and so on is action by User to communicate with Server by Rest API from Custom App.
4. Click to open Microflow Configuration Window
2. Click on to Connect to data icon 3. Click on the State tab and click on Connect to State button
6. Click on the tools panel on the left menu to open the interaction & data flow configuration panel (2)
7. Click to open Mapping Window (3)
2. Click to Connect to Data 3. Click the Microflow tab and choose the value from Microflow. Click on the 'Connect to Data' button
Step 3 - The login process uses Post Method. Run URL with parameter Content-Type: application/json and Body contains 3 values in JSON format. "username" : "administrator", "password" : "P@55w0rd", "clientId" : "123456789" After run login URL, the system will return id_token for use in other process. See picture below.
Example:
Request
Description
HTTP Method
1. /login
Login Process for get token id.
POST
2. /entity/{entityID}/search
Search Data in {entityID} by parameter in URL after running you will get data Json Format from {entityID}.
GET
3. /entity/{entityID}/get
Get Data Json Format from {entityID} after you pass parameter key in URL, you will get JSON data in all module of entity.
GET
4. /entity/{entityID}/save
Save Data JSON Body of {entityID} into Database.
POST
5. /entity/{entityID}/delete
Delete Data in Database from key parameter.
POST
6. /entities/save?mainEntityID={entityID}
Save Data JSON Body of {entityID} in Parent, Child Tab format into Database.
POST
7. /file/upload
Upload File into Server following configuration.
POST
8. /file/{id}/download
Download File From {id} which is uploaded from server.
GET
Process REST API is the list of REST APIs which is used to navigate the process flow from start to finish and to communicate with each other node over the process flow. The transfer of data happens over the network, which communicates through HTTP/HTTPS protocols.
The below table show the list of REST API methods provided to control process flow. For more details please check the API Guide
Request
Description
HTTP Method
1. /BPMREST/service/runtime/process/start
To start the flow.
POST
2. /BPMREST/service/runtime/process/[Process Name]/start
Old API to start flow. It is not recommended.
POST
3. /BPMREST/service/runtime/tasks/[Task ID]/claim?user=[User Name]
To claim a task by user.
POST
4. /BPMREST/service/runtime/tasks/[Task ID]/complete?user=[User Name]
To complete a process by user.
POST
5. /BPMREST/service/runtime/instance/[Instance ID]/tasks
To get task by instance ID.
GET
6. /BPMREST/service/runtime/tasks?[group/role/user]=[User Name/Role Name/Group Name]
To get task by user or role or group name
GET
7. /BPMREST/service/runtime/tasks/[Task ID]/variables
To get Task variables
POST
8. /BPMREST/service/runtime/tasks/[Task ID]/assign?user=[User Name]&user=[User Name1]..&user=[User Name n]
To assign task to user/ users
POST
9. /BPMREST/service/runtime/instance/[Instance ID]/tasks/assign?user=[User Name]
To assign instance to user
POST
10. /BPMREST/service/runtime/refreshCache
To refresh cache for all process
POST
11. /BPMREST/service/runtime/classAction
To refresh cache for a specific process
POST
Custom App is an external application following business of company which is developed outside the ONEWEB platform. It can call the Process Runtime using the Process REST APIs to control the process.
So from a Custom App, developer can use Ajax to call the Rest Services. Example of how to use the APIs is given below.
Example method control process This picture below is a process for "Booking Room". It starts the flow with choosing the room and then checking booking status. If the room is booked, then back to choose a new room. Else if the room is not booked, add details of customer into it and then save to database and update room status.
Step 1: Start flow Send parameter object to start flow, in this case is RoomObject and CustomerInfo.
Once the flow is started, system will return the instance id to control next step of process. In this case, instance id is "122056879-85735849-0b71-4299-9cd2-165f5b31c12e".
Step 2: Get task by instance id Now the developer can get task name using the instance id from first step.
For the second step, system will return the task name, task id and so on. Please see picture above.
Step 3: Assign Task (by users) Now Developer can assign the task using task id from second step with this URL below. http://192.168.0.213:8080/BPMREST/service/runtime/tasks/122056910-494baede-088f-46bb-8a24-77b049ef996c/assign?user=origcmr4"
After task is assigned, data will be displayed in the To Do List of the user (Origcmr4). (See picture below)
Note: The developer can also assign tasks by using the instance id from the first step by this url below. "http://192.168.0.213:8080/BPMREST/service/runtime/instance/122056879-85735849-0b71-4299-9cd2-165f5b31c12e/tasks/assign?user=origcmr4"
Step 4: Claim/Unclaim/Complete Task Finally, Origcmr4 can claim / unclaim or complete task by this url below.
Claim: http://192.168.0.213:8080/BPMREST/service/runtime/tasks/122056910-494baede-088f-46bb-8a24-77b049ef996c/claim?user=origcmr4 Unclaim: http://192.168.0.213:8080/BPMREST/service/runtime/tasks/122056910-494baede-088f-46bb-8a24-77b049ef996c/claim?user= Complete: http://192.168.0.213:8080/BPMREST/service/runtime/tasks/122056910-494baede-088f-46bb-8a24-77b049ef996c/complete?user=origcmr4
After Completing Task, the process will go to the next node. Thus it will continue with the process following the configuration of the next process activity until the end task.