Configure matching rules for MBO-related data on Unwired Server.
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="HandheldFriendly" content="True" /> <meta http-equiv="PRAGMA" content="NO-CACHE" /> <meta name="viewport" content="initial-scale = 1.0 ,maximum-scale = 1.0" /> <script src="js/PlatformIdentification.js"></script> <script src="js/hwc-api.js"></script> <script src="js/hwc-comms.js"></script> <script src="js/hwc-utils.js"></script> <script src="js/WorkflowMessage.js"></script> <script src="js/HybridApp.js"></script> <script> hwc.processDataMessage = function (incomingDataMessageValue) { if (incomingDataMessageValue.indexOf("<M>") != 0) { alert("An error occurred! " + incomingDataMessageValue); } var workflowMessage = new WorkflowMessage(incomingDataMessageValue); var values = workflowMessage.getValues(); var salesOrderList = values.getData("Sales_order"); var salesOrder = salesOrderList.value[0]; var salesOrderId = salesOrder.getData("Sales_order_id_attribKey").value; var custId = salesOrder.getData("Sales_order_cust_id_attribKey").value; alert("The customer id for sales order " + salesOrderId + " is " + custId); } </script> </head> <body onload="hwc.onHybridAppLoad_CONT()"> <h3>Server Notification Sample</h3> <button id="closeHybridApp" onclick="hwc.close()">Close</button> </body> </html>
<Notifications> <Notification type="onEmailTriggered" targetscreen="Salesorder" asyncRequestErrorScreen="" errorNotificationSubjectLine="" errorNotificationFromLine="" asyncRequestErrorlogs="" asyncRequestErrorLogMessage="" asyncRequestErrorLogMessageAsList=""> <Transformation> <Rule type="regex-extract" source="subject" workflowKey="order_id" workflowType="number" beforeMatch="find sales order \(" afterMatch="\)" format=""/> </Transformation> <Methods> <Method name="findByParameter" type="search" mbo="Sales_order" package="patterns_notification:1.0"> <InputBinding opname="findByParameter" optype="none"> <Value sourceType="Key" workflowKey="order_id" contextVariable="" paramName="order_id" attribName="id" mboType="int" convertToLocalTime="false"/> </InputBinding> <OutputBinding generateOld="true"> <Mapping workflowKey="Sales_order" workflowType="list" mboType="list"> <Mapping workflowKey="Sales_order_id_attribKey" workflowType="number" attribName="id" mboType="int"/> <Mapping workflowKey="Sales_order_cust_id_attribKey" workflowType="number" attribName="cust_id" mboType="int"/> <Mapping workflowKey="Sales_order_order_date_attribKey" workflowType="date" attribName="order_date" mboType="date"/> <Mapping workflowKey="Sales_order_fin_code_id_attribKey" workflowType="text" attribName="fin_code_id" mboType="string"/> <Mapping workflowKey="Sales_order_region_attribKey" workflowType="text" attribName="region" mboType="string"/> </Mapping> </OutputBinding> </Method> </Methods> </Notification> </Notifications>