Every workflow in a typical mule application consists of a input source, set of components performing workflow and a output/destination source. Input sources are referred to inbound connectors connected to particular system listening for data while output sources are outbound connectors which are used to send data after the completion of the workflow.
Before we dive into some details, there are some basic definitions you need to be aware of if you are new to mule:
Flow: Message traversing path.
SubFlow: Call to a sub process which will perform certain operations and return back to flow wheresubflow call was initiated. Subflows are mainly used for reuse-ability of common operations.
Connector: This is a configurable component which can be used to hook up with other systems/channels to either fetch or send data. If the connector is used to fetch data at the beginning of the flow, it is termed as inbound connector. Where as, if the connector is used to send data at the end or used in between the flow, it is referred to as outbound connector.
Input source can be a single inbound connector or a combination of inbound connectors which can pick up data from different systems/channels. Input source consisting of multiple inbound connectors can be achieved by using Composite Source scope and dropping required inbound connectors within the Composite Source source.
Unfortunately, we cannot use Composite Source for outbound. However, we do have other options like using scatter-gather component to call multiple components at same time and combine the returning the result from all of them. We can also use multiple Async blocks with outbound endpoints.Once the messages are received by inbound connector, they can be processed synchronously or asynchronously based on the configured flow processing strategy.
Workflow in between the inbound and outbound connectors can be any set of mule components which can enrich/process/transform the message or send the message to other systems or simply call subflows which perform desirable operations.
Below is a screenshot of simple application with input source as file system and spits out data to Mongo DB. The workflow section comprises of conversion of payload, addition of message properties, collecting accounts data from salesforce and processing accounts by calling a subflow.