Mobile Workflow DCN With Payload

Understand how to construct a workflow DCN with payload message.

This example illustrates data flow of a WF-DCN with payload using an SAP EIS:

  1. When the EIS has new or modified data to push to Unwired Server, it initiates an HTTP request to the WF-DCN URL. The WF-DCN message contains the new or changed data object.
  2. When the WF-DCN message reaches Unwired Server, the workflow engine evaluates the matching rule against all registered workflows. If a matching rule matches this message, the workflow server starting point for that workflow is triggered to process the message.
  3. The data object included in the WF-DCN message is applied to the MBO CDB table by inserting new records or updating existing records.
  4. The workflow server-initiated starting point extracts parameter values from the message body and triggers the MBO object query to retrieve the newly inserted or updated record.
  5. The workflow engine converts the MBO data and WF-DCN message into a workflow notification, then pushes it to the device mobile inbox using Sybase messaging (MOCA).

MBO cache group policy

The cache group policy of MBOs used in WF-DCN with payload must be DCN.

Message format

The message format of the WF-DCN message with payload is:
{”id”:””,”op”:”:”,”subject”:””,”to”:””,”from”:””,”read”:,”priority”:,”body”:””,
“data”:[{”id”:””,”pkg”:”Package”,”messages”:[{”id”:”2”,”mbo”:”MBO”,”op”:”:upsert”,
”cols”:{”attribute1”:”value1”,”attribute2”:”value2”,”attribute3”:”value3”}}

The message must contain e-mail information: subject, to, from, and so on, and include the package name, MBO name, attribute name, and attribute value. The message can include multiple MBOs. For example:
{”id”:”1137”,”op”:”:upsert”,”subject”:”PERF0111’s Leave Request”,
”to”:”PERF0111”,”from”:”Leave Work Flow”,”read”:false,”priority”:true,
”body”:”MATCH:SUP_MWF,TaskID:TS97200149, WIID:1470577, USER:PERF0111*#END#*”,
”data”:[{”id”:”dcbtest”,”pkg”:”sup_mwf:1.2”,”messages”:[{”id”:”2”,”mbo”:”Workitem”,
”op”:”:upsert”,”cols”:{”WORKITEM”:”1470577”,”USERNAME”:”perf0111”,”DESCRIPTION”:”cc”,
”DECISION”:”test”}},{”id”:”6”,”mbo”:”Alternatives”,”op”:”:upsert”,
”cols”:{”WORKITEM”:”1470577”,”USERNAME”:”perf0111”,”PKEY”:”01”,”PVALUE”:”Ap”}}]}]}