Best practice for workflow design
The following is a recommended process for designing the workflows:
-
Model the process visually: In the Workflow Designer, drag and drop task elements onto a canvas and connect them with arrows to define the sequence of operations.
-
Configure task elements: Each element in the workflow represents a specific action. The key task types for implementing logic are:
- JDBC task: Use the JDBC Task for direct database interaction. The user can configure it to execute SQL statements like UPDATE or INSERT to manipulate data as part of the process.
- Javascript task: Use the javascript task to execute custom server-side JavaScript. This is useful for performing data transformations, applying conditional logic, or manipulating process variables that are passed between tasks.
-
Integrate user input: Workflows can pause and wait for the intervention. A user task element creates a task in a user's Workflow Inbox. The workflow only proceeds after the user has claimed the task and completed it e.g., by clicking Approve or Reject.
-
Deploy the workflow: Design the workflow, export it, and deploy it to the KAIZEN Runtime Environment. The workflow triggers automatically when called by the application e.g., through form submission.
-
Backend service logic (custom code): While frontend logic handles the user experience, the core business rules reside in the backend. The Service Designer is used to define the structure of the microservices and APIs, but the detailed, custom logic is written by developers in Java for Spring Boot.
How the process works
-
Define the API: In the Service Designer, define the API endpoints, specifying the URL, HTTP method e.g.,
POST, and the data it expects. -
Generate code: KAIZEN generates the boilerplate code for the service, including the controllers, data models, and Database Access Objects (DAOs).
-
Implement custom logic: This is the critical step. Open the generated code in your IDE and implement the custom business logic. Write the code to:
- Perform complex calculations.
- Interact with the database e.g., fetching a list of products, updating a record.
- Integrate with other external systems.
- Enforce security and validation rules on the server side.
This custom code executes specific tasks that the application needs to perform and extends the platform's functionalities.
By combining the frontend and backend logic, KAIZEN provides the option to build sophisticated and robust applications. You can use frontend JavaScript for a fluid UI, implement the core business rules with custom backend code in the services, and orchestrate complex, multi-step processes with the Workflow Designer.
Last updated on 20 May 2026