Hi All,

I need to create a outbound busniess process.
A document comes in to the system with multiple docs. So i use
document extraction to split the document. 
But my question is i need to generate the EDI Document which have the
perfect data before and after translation and send them to the trading
partner as one file and which doesnot have perfect data i.e missing
madatory segment etc, for those documents i need to send the error
message.

Below is my business process code.

Please help me out in resolving this issues as soon as possible.

<process name="OUTBOUND_TXT_TO_EDI">
  <rule name="more_split_docs">
    <condition>DocExtract.DONE = 0</condition>
  </rule>

  <sequence name="Sequence Start">
    <sequence name="Sequence Start">
      <operation name="Timestamp Utility">
        <participant name="TimestampUtilService"/>
        <output message="TimestampUtilServiceTypeInputMessage">
          <assign to="action">current_time</assign>
          <assign to="format">yyyyMMdd_HHmmssSS</assign>
          <assign to="." from="*"></assign>
        </output>
        <input message="inmsg">
          <assign to="." from="*"></assign>
        </input>
      </operation>

      <operation name="Business Process Metadata">
        <participant name="BPMetaDataInfoService"/>
        <output message="BPMetaDataServiceTypeInputMessage">
          <assign to="." from="*"></assign>
        </output>
        <input message="inmsg">
          <assign to="." from="*"></assign>
        </input>
      </operation>

      <operation name="Origin file">
        <participant name="MIQ_Generic_File_System_Adapter"/>
        <output message="FileSystemInputMessage">
          <assign to="Action">FS_EXTRACT</assign>
          <assign to="appendOnExtract">true</assign>
          <assign to="assignedFilename" from="FileName/text()"></assign>
          <assign to="extractionFolder"
from="concat(&apos;../GISData/&apos;,//result/row/Origin_Archive_Folder/text())"></assign>
          <assign to="." from="*"></assign>
        </output>
        <input message="inmsg">
          <assign to="." from="*"></assign>
        </input>
      </operation>

      <operation name="Document Extraction">
        <participant name="DocumentExtractionService"/>
        <output message="DocumentExtractionTypeInputMessage">
          <assign to="BatchLikeDocuments">NO</assign>
          <assign
to="DocExtractMapList">TXT_ROUTINSTR_FT-X12_7544030_TARG_Header</assign>
          <assign to="." from="*"></assign>
        </output>
        <input message="inmsg">
          <assign to="." from="*"></assign>
        </input>
      </operation>

    </sequence>
    <assign name="Assign" to="counter">1</assign>
    <assign name="Assign" to="DOCUMENT_NAME_PREFIX">DOC-SPLIT-</assign>
    <sequence name="foreachSplitDoc">
      <operation name="For Each Document">
        <participant name="ForEachDocument"/>
        <output message="ForEachDocumentTypeInputMessage">
          <assign to="DOCUMENT_NAME_PREFIX">DOC-SPLIT-</assign>
          <assign to="ITERATOR_NAME">DocExtract</assign>
          <assign to="." from="*"></assign>
        </output>
        <input message="inmsg">
          <assign to="." from="*"></assign>
        </input>
      </operation>

      <choice name="Choice Start">
        <select>
          <case ref="more_split_docs" activity="process_split_doc"/>
        </select>

        <sequence name="process_split_doc">
          <sequence name="ConfigStart">
            <operation name="EDI Encoder">
              <participant name="EDIEncoder"/>
              <output message="EDIEncoderTypeInputMessage">
                <assign to="AccepterLookupAlias"
from="//AccepterLookupAlias/text()"></assign>
                <assign to="ReceiverID"
from="//ReceiverID/text()"></assign>
                <assign to="SenderID">YRCLFL</assign>
                <assign to="." from="*"></assign>
              </output>
              <input message="inmsg">
                <assign to="."
from="Status_Rpt(&apos;StatReport&apos;)"></assign>
                <assign to="PrimDocument"
from="PrimaryDocument/@SCIObjectID"></assign>
              </input>
            </operation>

          </sequence>
          <operation name="EDIEnvelope">
            <participant name="EDIEnvelope"/>
            <output message="EDIEnvelopeTypeInputMessage">
              <assign to="MODE">IMMEDIATE</assign>
              <assign to="RECEIVER_ID"
from="//ReceiverID/text()"></assign>
              <assign to="SENDER_ID">YRCLFL</assign>
              <assign to="." from="*"></assign>
            </output>
            <input message="inmsg">
              <assign to="." from="*"></assign>
            </input>
          </operation>

          <operation name="Invoke Sub-Process">
            <participant name="InlineInvokeSubProcessService"/>
            <output message="InvokeSubProcessServiceTypeInputMessage">
              <assign to="NOTIFY_PARENT_ON_ERROR">ALL</assign>
              <assign to="." from="*"></assign>
            </output>
            <input message="inmsg">
              <assign to="." from="*"></assign>
            </input>
          </operation>

          <repeat name="repeater" ref="foreachSplitDoc"/>

          <onFault>
            <sequence name="Sequence Start">
              <assign name="Assign"
to="SendMail/BusinessProcess">BusinessProcess:YRCL_Outbound_TXT_EDI</assign>
              <operation name="GetMailto">
                <participant name="UserService"/>
                <output message="UserServiceTypeInputMessage">
                  <assign to="MethodName">getEmail</assign>
                  <assign to="UserName">Admin</assign>
                  <assign to="." from="*"></assign>
                </output>
                <input message="inmsg">
                  <assign to="." from="*"></assign>
                </input>
              </operation>

              <operation name="Invoke Business Process Service">
                <participant name="InvokeBusinessProcessService"/>
                <output
message="InvokeBusinessProcessServiceTypeInputMessage">
                  <assign to="WFD_NAME">YRCL_Email_Onfault</assign>
                  <assign to="." from="*"></assign>
                </output>
                <input message="inmsg">
                  <assign to="." from="*"></assign>
                </input>
              </operation>

            </sequence>
          </onFault>
        </sequence>
      </choice>
    </sequence>
    <sequence name="Sequence Start">
      <assign name="Assign" to="/ProcessData/ArchiveFileName"
from="concat(//result/row/Translated_File_Name/text(),//WORKFLOW_ID/text(),&apos;_&apos;,//time/text(),&apos;.&apos;,//result/row/Translated_File_Type)"></assign>
      <operation name="File SystemAdapter">
        <participant name="MIQ_Generic_File_System_Adapter"/>
        <output message="FileSystemInputMessage">
          <assign to="Action">FS_EXTRACT</assign>
          <assign to="appendOnExtract">true</assign>
          <assign to="assignedFilename"
from="/ProcessData/ArchiveFileName/text()"></assign>
          <assign to="extractionFolder"
from="concat(&apos;../GISData/&apos;,/ProcessData/result/row/Translated_Archive_Folder/text())"></assign>
          <assign to="." from="*"></assign>
        </output>
        <input message="inmsg">
          <assign to="." from="*"></assign>
        </input>
      </operation>

    </sequence>
  </sequence>
</process>



------------------------------------

...
Please use the following Message Identifiers as your subject prefix: <SALES>, 
<JOBS>, <LIST>, <TECH>, <MISC>, <EVENT>, <OFF-TOPIC>

Job postings are welcome, but for job postings or requests for work: <JOBS> IS 
REQUIRED in the subject line as a prefix.Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/EDI-L/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/EDI-L/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[EMAIL PROTECTED] 
    mailto:[EMAIL PROTECTED]

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/

Reply via email to