Workflows
How Can I Add Workflows to My App?
Workflows are natively part of the logic capabilities of Mendix.
The visual workflow editor in Mendix Studio Pro allows you to build extendable processes in a format that closely follows BPMN concepts. Workflow logic is fully integrated with other visual languages, such as microflows and pages.
Developers building workflows have full control over the workflow data, since the same domain model than underpins the entire app is the foundation for the workflow definition. This means you can build workflows data-first.
Workflows are executed in the Mendix Runtime, which is able to run long-lived processes. You do not need to include an external workflow engine or deploy your workflows and their orchestration separate from the main application.
Who Can Build Workflows?
Both trained developers and tech-savvy business users can capture processes into workflows.
Developers can use the full power of Mendix Studio Pro to model the ins and outs of any process in the highest level of detail, apply advanced logic, integrate with any system, and create reusable workflow artifacts.
With Mendix, the process definition becomes part of the app. This increases maintainability. It also means that developers can work with different apps easier, as it becomes easy to understand the overarching logic in each app. This reduces the cost and time involved to switch contexts considerably.
Moreover, since the process is defined explicitly and visually, you can leverage the review capabilities of the Mendix Platform to involve business-minded users in the development process of advanced workflow logic, which significantly shortens the feedback loop.
How Can I Trigger a Workflow?
Workflows can be triggered from buttons and from microflows. Since microflows can be exposed and called via REST, this means workflows can also be called remotely.
Think of a workflow as process orchestration across multiple user tasks (that show pages to users executing a task) and microflow tasks (that the workflow runs when the microflow is configured as a system task). In the workflow domain, microflows can also be used to kick-off a workflow, or to complete a user task, e.g. when advanced validation is required.
How Can a Process Administrator Handle In-Flight Processes?
Long-lived business processes imply the need for functional process management. For example, assigned users are on leave, process definitions change or certain process instances are run out-of-process as an exception.
Developers can use a range of actions in pages and microflows to enable process administrators to manage workflow instances effectively.
Mendix gives the developer full control to build process management capabilities. To speed things up, Mendix comes with a fully functional Workflow Commons module that contains pre-configured process management screens, dashboards, and a generic inbox screen. All of these are customizable and can be replaced by a module of your choice. This allows for company branding of pages and implementing other company-specific process requirements.
How Can I Reuse Workflow Logic and Content?
Mendix gives the developer full control to build reusable workflow artefacts. For initial speed, Mendix comes with a fully-functional Workflow Commons module that contains preconfigured process management screens, dashboards, and a generic inbox screen. Workflow Commons also contains other preconfigured documents, such as snippets, page templates, and microflows.
Installing this module is not required for workflow capabilities to be enabled. However, it does simplify a developer’s work so that they can benefit from out-of-box functionality. All of the content is customizable and can be replaced by a module or implementation of your choice.
Moreover, developers can add reusable elements to the workflow editor toolbox by exposing microflows as workflow actions. These can also be imported via modules containing exposed microflows from the Marketplace and other repositories.