You are not looking at the latest version of the documentation. Check it out there.
You are looking at draft pre-release documentation for the next release of Flows for APEX. Product features documented here may not be released or may have different behavior to that documented here. You should not make any purchase decisions based on this draft documentation..

How do I use the limited MessageFlow in Community Edition?

There are 3 main use cases for the limited capabilities of MessageFlow in Flows for APEX Community Edition. The functionality in Flows for APEX Enterprise Edition makes messageFlow much more powerful, but we believe the functionality in the Community Edition release has several uses.

1. Flows for APEX Process needs to wait for, and receive information from a Non-Flows for APEX program.

Scenario: Your business process needs to wait until something happens outside the control of APEX and Flows for APEX. Asynchronously, when the external process is ready, it sends a message - optionally with a payload - to the process, causing the process to continue.

Example Sales Order Process.

  • The external local process could be called using Send Task with a sub-type of PL/SQL Call. This would just call the local task using PL/SQL, rather than sending it a formatted message.
  • The process then starts a Message Catch Event and a Timer Catch Event - and waits.
  • If the Timer fires first, because no payment was received within the 14 day timer period, the order gets cancelled and the process ends.
  • When the payment is ready, the local process uses the Flows for APEX API to call flow_api_pkg.receive_message, passing in the message name, key name, key value, and a payload JSON snippet containing the bank reference number and amount paid.
  • The incoming message is caught by the Message Catch Event. This causes the Event Based Gateway to terminate the Time-out Timer. The message payload is inserted into a process variable, and the subscription then cancelled (used).
  • The process steps forward.

2. Flows for APEX Process waits for remote message via REST

A remote process could use the REST endpoint to send a message into the local Flows for APEX process instance.

3. Inter-process communication between two processes running in the same Flows for APEX Workspace.

As a beta / lab feature, it is possible for two process instances in the same Flows for APEX System and running inside the same APEX Workspace to send and receive messages to each other - but the Enterprise Edition functionality is highly recommended.

Tightly Coupled Processes.

  • With Community Edition, the two processes must be in two different diagrams, Each diagram should reference the other diagram as a dark pool / black box. Do not define both processes as part of a single Collaboration on a single BPMN diagram without Enterprise Edition
  • The current architecture has the two instances tightly coupled. A message send task from one process calls the message receive task in the other process – and these process steps in the called process will be executed by the user sending the message.
  • If you do have Process A sending a message to Process B, the catch event in Process B must do something in a non-synchronous process step before it then sends a reply message for process A to catch – otherwise the sending task in process A is still current, and process A is not yet waiting to receive a message from Process B. Add a short timer to create a delay between Process B’s receive task and its replying send task.
  • Consult the Flows for APEX Team if you really want to do this!
  • Consider upgrading to the Enterprise Edition if you want to make full use of process collaboration. Having Message Start Events, Message Boundary Events, and Message End Events make implementing process collaboration much easier!