Document on concatinate control
number and current date and import the file to dashboard using
business process
First we need to create control number
in dash board Trading Partner->Control Number
We need to create Business process for
concatinate and import the file.In that BP we are using different
services like.
- Assign
- Time stamp utility
- Document xpath replace service
- Translation
- Import service
Business Process:
Use of Services:
Assign service: In
Assign service by using DocToDOM function we are update primary
document to process data.
Time stamp utility:Time stamp
utility service is used to get the current date and time.
Assign service: In
this service by using concat function we are concatinating the
current time and control number.
Document xpath replace service:
By using this service we are updating data fom process data to
primary document.
Translation: This
service is used to translate the map.Here map is used to add the
header details to the primary document.
Import service: This
service is used to import the primary document to dashboard.
Bpml code:
<process name="default">
<sequence>
<assign name="Assign"
to="." from="DocToDOM(PrimaryDocument)"></assign>
<operation name="Timestamp
Utility">
<participant
name="TimestampUtilService"/>
<output
message="TimestampUtilServiceTypeInputMessage">
<assign to="."
from="*"></assign>
<assign
to="action">current_time</assign>
<assign
to="format">YYYYMMddHHMMss</assign>
</output>
<input message="inmsg">
<assign to="."
from="*"></assign>
</input>
</operation>
<assign name="Assign"
to="Append" from="concat(//VALUE/text(),//time)"></assign>
<operation name="Document
XPath Replace Service">
<participant
name="DocXPathReplace"/>
<output
message="DocXPathReplaceInputMessage">
<assign to="."
from="*"></assign>
<assign
to="debug">true</assign>
<assign
to="keepDocEncoding">false</assign>
<assign
to="keepDocType">true</assign>
<assign to="replacementText"
from="//Append/text()"></assign>
<assign
to="replaceMultiple">false</assign>
<assign
to="textNodeXPath">//VALUE/text()</assign>
</output>
<input message="inmsg">
<assign to="."
from="*"></assign>
</input>
</operation>
<operation name="Translation">
<participant
name="Translation"/>
<output
message="TranslationTypeInputMessage">
<assign to="."
from="*"></assign>
<assign
to="map_name">XportAndImport</assign>
</output>
<input message="inmsg">
<assign to="."
from="*"></assign>
</input>
</operation>
<operation name="Import
Service">
<participant
name="ImportService"/>
<output
message="ImportTypeInputMessage">
<assign to="."
from="*"></assign>
<assign
to="KeepExistingControlNumbers">NO</assign>
</output>
<input message="inmsg">
<assign to="."
from="*"></assign>
</input>
</operation>
</sequence>
</process>
Example:
Input:
<CONTROL_NUMBERS>
<CONTROL_NUMBER>
<CONTROL_NUMBER_ID>85298315f0c5f1ab5node1</CONTROL_NUMBER_ID>
<EXTERNAL_OBJECT_ID></EXTERNAL_OBJECT_ID>
<NAME>BP_Control_Number</NAME>
<SENDER_ID>14147844480</SENDER_ID>
<RECEIVER_ID>067429365</RECEIVER_ID>
<VALUE>13</VALUE>
</CONTROL_NUMBER>
</CONTROL_NUMBERS>
Output:
<?xml
version="1.0" encoding="UTF-8" standalone="yes"
?>
<SI_RESOURCES
xmlns='http://www.stercomm.com/SI/SI_IE_Resources'
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
<CONTROL_NUMBERS>
<CONTROL_NUMBER>
<CONTROL_NUMBER_ID>85298315f0c5f1ab5node1</CONTROL_NUMBER_ID>
<EXTERNAL_OBJECT_ID/><NAME>BP_Control_Number</NAME>
<SENDER_ID>14147844480</SENDER_ID>
<RECEIVER_ID>67429365</RECEIVER_ID>
<VALUE>1320171012071022</VALUE>
<CONTROL_NUMBER>
<CONTROL_NUMBER_ID>85298315f0c5f1ab5node1</CONTROL_NUMBER_ID>
<EXTERNAL_OBJECT_ID/><NAME>BP_Control_Number</NAME>
<SENDER_ID>14147844480</SENDER_ID>
<RECEIVER_ID>67429365</RECEIVER_ID>
<VALUE>1320171012071022</VALUE>
</CONTROL_NUMBER>
</CONTROL_NUMBERS>
</SI_RESOURCES>
Screenshot:
No comments:
Post a Comment