Coercing of Activity Input, Output, and Trigger Reply Fields
In the OSS marked activity input, output or trigger reply configuration, if you have defined a parameter, but have not defined or cannot define a schema for the parameter, you can coerce the parameter to take the value from a schema that you dynamically define during design time. This feature is particularly useful for apps that were created in Project Flogo and imported to TIBCO Cloud Integration - Flogo (PAYG). Such apps will likely have activities for which input parameters or output are not defined with a schema.
After you enter the schema, it is displayed in a tree format under Activity Input, Output tab, or Trigger Reply in the mapper. All subsequent activities will also display the elements of the schema under the activity in the Upstream Output. The schema elements will now be available for you to map.
Note the following:
- Coercing is supported only in the Default category activities which are the activities marked as OSS, with the exception of the Return and Start a SubFlow activities. These two activities display flow-level data. The the flow-level inputs and outputs can be entered or modified only in the Flow Inputs & Outpts accordian tab, hence they cannot be coerced from within the Input tab of the activity itself.
- Currently, coercion is supported only for top-level parameters. Nested coercion (for example, an object within an object) is not supported.
- Currently, coercing a schema for trigger input is not supported. The coercing option is not available in the Map to Flow Inputs tab in the trigger configuration. This is because the parameters you see in this tab are flow input parameters and are not related to the trigger. You have the option to coerce these parameters in the Input tab of the Flow Inputs & Outputs accordion tab.
- After you have mapped a child element within a parameter, if you change the name of the parent or the child, your mapping will be lost. However, if you change the data type of the element, the mapping is preserved, but you see an error related to the mismatch in data type.
- The schema you enter is preserved when you export and import the app.
- If you edit the schema at a later time, as long as you click the Apply button after editing, your edits will display in the mapper. You must then click Save in the mapper to persist your schema changes.
- You cannot coerce a parameter or edit its schema in any activity appearing in a subflow. For example, if the OracleDatabaseQuery activity appears in both the main flow and the subflow, you cannot edit the schema of any of its parameters in the subflow. But you can edit the schema of the OracleDatabaseQuery activity in the main flow. This is because the subflow activity input and output schemas are inherited from the main flow. There is a possibility that the same subflow could be used in multiple main flows, so if you edit an activity in the subflow it could break another main flow which uses the subflow.