Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
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.
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
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.
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
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.
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.
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.
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.