(3.10) SavePayload Process
Our template solution includes the implementation of one typical Dell Boomi process for message payload management. Within this process, all the needed logic will be implemented to store, when needed, the message payload together with the additional interface details.
Before we go into the components of the SavePayload process, we must emphasize the importance of the ability to turn on and off the message persistence. Also, for the proper test case creation and execution, there is the need to identify the landscape of the processed message.
To achieve that, we recommend the creation of a Process Properties Extension named PP_IFTT. Please remember to add this extension to the SavePayload Process.
The PP_IFTT extension should have two properties.
Trace: type of string and the following Allowed Values:
Allow payload persistence = “X”
Trace off = “-”
Environment: type of string and the Allowed Values according to your landscapes
Of course, those properties need to be configured accordingly on each environment you plan to use on Int4 IFTT. The user needs an administrator role on the Dell Boomi account to configure the extension properties.
Also, please note that there must be provided to this process a Dynamic Process Property named DPP_BOOMI_STEP with the values “INPUT” or “OUTPUT” accordingly.
Please find below all the components of the SavePayload Process explained in details:
Data Passthrough Start Shape - Or according to the call of this process
Decision shape which validates the global parameter “Trace“ - only when “Trace” is on, the payload will be sent to Int4 IFTT
Set Properties Shape to read the value of the custom HTTP Header x-wss-correlationid
Data Process Shape with the following custom Groovy Script to populate the additional information for the Int4 IFTT WebService call
import java.util.Properties import java.io.InputStream import com.boomi.execution. * import com.boomi.execution.ExecutionUtil import com.boomi.execution.ExecutionManager //System Line ExecutionUtil.setDynamicProcessProperty('DPP_BOOMI_SYSTEM_LINE', "BOOMI", false) //Execution ID def executionId = ExecutionManager.getCurrent().getTopLevelExecutionId() ExecutionUtil.setDynamicProcessProperty('DPP_BOOMI_EXECUTION_ID', executionId, false) //Process Name def processName = ExecutionManager.getCurrent().getParent().getProcessName() ExecutionUtil.setDynamicProcessProperty('DPP_BOOMI_PROCESS_NAME', processName.toUpperCase(), false) //Payload def payload = dataContext.getStream(0) payload = payload.getText("UTF-8") payload = payload.bytes.encodeBase64().toString() ExecutionUtil.setDynamicProcessProperty('DPP_BOOMI_PAYLOAD', payload, false) //Message Id def messageId = org.apache.commons.lang.RandomStringUtils.randomAlphanumeric(25) ExecutionUtil.setDynamicProcessProperty('DPP_BOOMI_MESSAGE_ID', messageId, false) for (int i = 0; i < dataContext.getDataCount(); i++) { InputStream is = dataContext.getStream(i) Properties props = dataContext.getProperties(i) dataContext.storeStream(is, props) }
Map Shape to create a proper XML sent to Int4 IFTT the payload with the additional interface and test run information. The target structure is as below.
Map the following elements:
DPP_BOOMI_CORRELATION_ID → IV_CORRELATION_ID
DPP_BOOMI_EXECUTION_ID → IV_EXECUTION_ID
DPP_BOOMI_PROCESS_NAME → IV_INTERFACE
PP_IFTT-Environment → IV_LANDSCAPE_ID
DPP_BOOMI_MESSAGE_ID → IV_MESSAGE_ID
DPP_BOOMI_PAYLOAD → IV_PAYLOAD
DPP_BOOMI_STEP → IV_STEP_ID
DPP_BOOMI_SYSTEM_LINE → IV_SYSTEM_ID
Connector Shape to Int4 IFTT WebService - configured accordingly
Stop Shapes to close both paths of the Process
After creating the SavePayload Process and making a call to it through another process, you should be able to save the payloads to Int4 IFTT. The template process should look like below.
Related content
© 2017 - 2022 Int4 AG All rights reserved