File_5-1
File_5-1
File_5-1
Introduction:
Write operation:
Note:
When retrieving a message body from a data store operation,
only XML is supported.
In the ‘Write’ control step, select ‘Global’ for the parameter ‘Visibility’
so that the message stored is visible to other iflows.
Body:
<Emp_Details>
<Emp1>
<Name>jack</Name>
<Salary>1000</Salary>
<Location>UK</Location>
</Emp1>
<Emp2>
<Name>will</Name>
<Salary>2000</Salary>
<Location>SA</Location>
</Emp2>
</Emp_Details>
1. Here I have selected that two messages have to be polled from the
data store to be sent to the receiver.
2. On deploying the iflow, we can observe the results in message
processing log as below-
On observing the data store, we could find out that the Select operation
by default selects the first two messages that were initially added to the
data store.
Delete operation
1. The value for the parameter ‘Visibility’ is Global, so that the iflow
will look for the given data store ‘TestDSN’ at the tenant level.
3. On deploying the iflow, we could check that the message relating
to the Entry ID specified in the iflow has got deleted and now only
2 entries are available.
Persist Messages
Store a message so that you can access the stored message and
analyze it at a later point in time.
Retrieve Persisted payload in SAP CPI
SAP CPI has an option to store a message at a specific point in the
message processing using Persist. The persisted message can be
retrieved later and use accordingly.
The logical storage location used by the Persist step is the message store.
Physically, the message store uses the same tenant database as the data
store. The overall disk space limit is 32GB.
Since the persisted messages was not part of CPI monitoring view, the
payload has retrieve using OData API. The data can be retrieved using
the message id, which persisted in the DB.
To retrieve payload, a custom integration flow can build as below.
1- https://625c71d4trial.it-cpitrial05.cfapps.us10-
001.hana.ondemand.com/api/v1/MessageProcessingLogs('A
GMRGHYF5uvUVEnxkB-61x66buhT')/MessageStoreEntries
2- Extract this value from output
3- https://625c71d4trial.it-cpitrial05.cfapps.us10-
001.hana.ondemand.com/api/v1/MessageStoreEntries('
3632356337316434747269616c2f6d657373616765737
46f72652f6d6573736167652f41474d52474859463575
765556456e786b422d3631783636627568542f506572
73697374352f33373033653133632d396232312d3461
65622d393062312d373566366439626533303566')/$va
lue
Global Variable: Write Variable in CPI
There are scenarios where you might want to use a variable stored
in one iflow and call it from another process in CPI or to query
OData based on the last successful run from another Iflow. Write
Variables is one such functionality provided by SAP in CPI/HCI.
Deleting a variable