For example, suppose your application or trading partner should place a file on an FTP site every night. If the scheduled integration process runs but does not find a file, you want to send an email notify administrators of a potential problem. However because shapes in a process only execute if a document reaches them, how can you send the email if no documents are returned by the connector in the Start shape?
The solution is to configure the Start shape as "No Data", perform the "source" connector call within the process, and use a process property as a "flag" that will get set if any documents are returned. The process would look something like this:
- "No Data" Start shape simply passes a single blank document into the process.
- FTP connector attempts to retrieve file(s).
- If at least one file is found, it will be returned as a document and execute the Set Properties shape. If no documents are returned, the property value will never be set (i.e. be null).
- The Set Properties shape sets a Process Property called "Found Data" to "true".
- The documents will continue to other shapes in the process as required by your integration scenario.
- At the end of the process, it will come back to the Decision shape on branch 2.
- If the "Found Data" property equals "true", then you know documents were actually returned by the FTP connector.
- Else if the "Found Data" property is not "true" (e.g. blank or null), then no documents were returned by the FTP connector and you can send an alert and/or perform other actions as necessary.
Additional Advanced Considerations
If the connector call can return multiple documents you may want to consider keeping the connector call in the Start shape but invoking that process from a "parent" process, like this:
The "Get Daily FTP File" child process would be configured with the connector call in the Start shape and then set the property value but the parent process would inspect that value (remember parent and child process executions share the same "execution memory" for things like process properties). This approach allows each document in the child process to be tracked individually which can avoid complicating document-level exception handling as well as provide document tracked fields and retries via process reporting (note: you would want to deploy the child process as well to allow document retries).