Microflows have parameters, a return type (the return value is defined in an object, see below), and allowed module roles. Rules are similar to microflows, but have rule parameters, and they do not have some Microflow-specific properties
Mendix Modeler Reference Guide | Model SDK API docs
The Microflows overview page | The
Microflow, technical information on properties of a microflow | Microflow
Rule | Rule
Parameter | MicroflowParameter
Microflow & Rule structure
Microflows consist of a collection of objects connected by flows. The objects represent activities, such as Object manipulation & retrieval, microflow calls, web service calls, etc. (details follow below).
For example, a simple microflow could consist of a start event, a single activity, and an end event. The `Microflow would then have three MicroflowObjects in its MicroflowObjectCollection, and would have two SequenceFlows. The first sequence flow would have the start event as its origin and the activity as its destination. The second sequence flow would have the activity as its origin, and the end event as its destination.
There are several types of objects that can be added to a microflow. One type is
Activity, which can either be a loop, or an action activity, which will execute a microflow action (see the next section for more details on different types of activities). Other microflow object types include start and end events, splits and merges, annotations and parameters.
Mendix Modeler Reference Guide | Model SDK API docs -| Activities | MicroflowParameterObject, Activity Start and End events | StartEvent, EndEvent Loops, with Break and Continue events | LoopedActivity, BreakEvent, ContinueEvent Annotation | Annotation
A microflow consists of objects that are connected by flows, specifically,
SequenceFlows. A flow has an origin and a destination, with which the order of objects in the microflow is defined.
An exclusive split on an enumeration has a sequence flow for each enumeration value. In the meta model, this is represented by the case value of the sequence flows. Each sequence flow has an enumeration case value with
value set to the corresponding enumeration case. Boolean splits have two sequence flows, one for each of
false, with each a corresponding case value.
Inheritance splits have sequence flows for each specialization of the entity type on which is split. Each sequence flow has an inheritance case value with as value the specialization entity.
Annotation flows are used to connect annotations to other microflow objects.
Mendix Modeler Reference Guide | Model SDK API docs
Sequence Flow | Flow
Annotation flow | SequenceFlow
destination of Flow
|CaseValue and its inheritance hierarchy
The control flow in microflows is defined with splits of two types: exclusive splits (for boolean or enumeration splits) and inheritance splits (for control based on specialization entity types). Two paths of control can be merged with an exclusive merge.
An exclusive split conditionally splits on either an expression or a rule. In case of a rule, a call is made, similar to a microflow call, with a rule parameter mapping.
Mendix Modeler Reference Guide | Model SDK API docs -| Exclusive Split |ExclusiveSplit Inheritance Split |InheritanceSplit Merge |ExclusiveMerge Rules |ExpressionSplitCondition |RuleSplitCondition |RuleCall |RuleCallParameterMapping
Working with objects
Objects can be manipulated in microflows through several activities. New objects can be created. Existing objects can be retrieved (see the next subsection for details). All objects can be updated or deleted. All changes (including creation and deletion) can be committed or rolled back.
Object attributes can be updated with a change action, both in a create action and in an update action.These actions have a list of items that describe which attribute or association is set, to a certain value.
Mendix Modeler Reference Guide | Model SDK API docs -| Create Object |CreateObjectAction and ChangeObjectAction (ChangeMembersAction, MemberChange) Change Object | DeleteAction Rollback Object |CommitAction and RollbackAction
A retrieve action is either an association-based retrieve or a database-based retrieve. An association-based retrieve points to a specific association and retrieves the relevant objects over that association. A database-based retrieve directly accesses the database and provides control over the XPath constraint, sorting of the retrieved objects and the range of objects to retrieve.
Mendix Modeler Reference Guide | Model SDK API docs -| Retrieve |RetrieveSource XPath constraints |AssocationRetrieveSource |DatabaseRetrieveSource |Range, ConstantRange and CustomRange |SortItemList and SortItem
Microflows can call other microflows by defining a mapping of expressions to parameters (of the called microflow).
Web Client activities
Microflows can trigger behavior in the browser: showing and closing pages, showing (popup) messages, providing validation feedback and triggering file downloads.
Mendix Modeler Reference Guide | Model SDK API docs -| Show Page and Show Home Page |ShowPageAction and ShowHomePageAction Close Page |CloseFormAction Show Message |ShowMessageAction Validation Feedback |ValidationFeedbackAction Download File |DownloadFileAction
App service calls
An app service call action points to a specific app service action (which is part of a consumed app service). The action call has a list of parameter mappings of app service action parameters to expressions.
Web service calls
A web service call to an imported web service has an HTTP configuration, and a request and response handling configuration to map the request and response parameters of the third-party web service operation to Mendix app concepts.
See the following diagrams for details on the HTTP configuration, request handling, and response handling.
Web service calls - Request HTTP configuration
An HTTP configuration has an optional custom endpoint location, authentication credentials, and optional HTTP headers.
Web service calls - Request handling
A web service operation request needs to be mapped from Mendix app concepts to the specifics of the web service operation. There are four different ways in which request handling can be configured. Each has its own specific configuration options.
- Export Mapping - The recommended option whenever you are sending complex XML objects (non-primitives) to a third party.
- Simple Parameter Mapping - Use this option when you are just sending primitive values to a third party. The argument can be any MicroflowExpression producing a value compatible with the parameter type. The ElementPath is a string representing the place in the element tree of the parameter in the XML message.
- Advanced Parameter Mapping - This is a combination of the above two mappings, starting one level deeper in the XML hierarchy than a regular export mapping. Use a MicroflowExpression for a primitive value and an ExportMapping for a complex one.
- Custom mapping - Specify the XML to be sent manually. Powerful yet dangerous.
Mendix Modeler Reference Guide | Model SDK API docs -| Call Web Service |RequestHandling |SimpleRequestHandling - WebServiceOperationSimpleParameterMapping |AdvancedRequestHandling - WebServiceOperationAdvancedParameterMapping |MappingRequestHandling |CustomRequestHandling
Web service calls - Response handling
The result of a web service operation needs to be mapped to Mendix app concepts with an import mapping call which uses an import mapping. The range of objects to map can also be controlled.
Microflow variables can be created and changed with specific actions. A create variable action also has a data type to indicate the type of the newly created variable.
Lists can be created, changed and deleted with specific actions. List aggregation actions have a specific function (e.g. sum or average). List operations can also be executed, see the following sections for details.
Mendix Modeler Reference Guide | Model SDK API docs -| Create List |CreateListAction Change List |ChangeListAction Aggregate List |DeleteAction List Operation |AggregateListAction |ListOperationAction and ListOperation
Lists - Operations
Lists can be manipulated with different types of operations. Lists can be sorted, with a list of sorting items. Head and tail provide the first and remainder of a list, respectively. Find and filter respectively pick one and all elements of a list that adhere to some condition.
Lists - Binary operations
Lists can be manipulated with several binary operations, which take two lists as input.
Java action calls
Java action calls point to a specific Java action and have a parameter mapping with an expression for every parameter of the Java action.
Logging actions target a single log node on a specific log level. The log message is parameterized.
Importing & Exporting XML
XML import actions use an XML-to-domain mapping similar to web service response mappings.
XML export actions use a domain-to-XML mapping similar to web service request mappings.
Documents are generated from a document template. Such a template has parameters, which are mapped with a parameter mapping at each call site.