3. More than one sequence in a process

We separated a previous process into 2 sequences. Every sequence has its own OnFault group.
Example of the process is:

Bpml code:
<process name="default">
<sequence>
<sequence name="firstSequence">
<assign to="firstSequenceVar_1">1_1</assign>
<operation name="File System Adapter">
<participant name="FS_InstallValidation"/>
<output message="FileSystemInputMessage">
<assign to="." from="*"></assign>
<assign to="Action">FS_COLLECT</assign>
<assign to="filter">*.txt</assign>
<assign to="deleteAfterCollect">false</assign>
</output>
<input message="inmsg">
<assign to="." from="*"></assign>
</input>
</operation>
<assign to="firstSequenceVar_2">1_2</assign>
<onFault code="No files to collect">
<sequence name="Sequence Start">
<assign name="Assign" to="ERROR_SEQ1">There is no files to collect from collection Folder!</assign>
</sequence>
</onFault>
<onFault>
<sequence name="Sequence Start">
<operation name="Business Process Metadata">
<participant name="BPMetaDataInfoService"/>
<output message="BPMetaDataServiceTypeInputMessage">
<assign to="." from="*"></assign>
<assign to="TRACE">TRUE</assign>
</output>
<input message="inmsg">
<assign to="." from="*"></assign>
</input>
</operation>
<operation name="XSLT Service">
<participant name="XSLTService"/>
<output message="XSLTServiceTypeInputMessage">
<assign to="." from="*"></assign>
<assign to="xslt_name">TEST_error</assign>
<assign to="xml_input_from">ProcData</assign>
<assign to="input_pd_xpath">/</assign>
</output>
<input message="inmsg">
<assign to="." from="*"></assign>
</input>
</operation>
<operation name="Mail Mime Service">
<participant name="MailMimeService"/>
<output message="MailMimeServiceInputMessage">
<assign to="." from="*"></assign>
<assign to="mail-mime-subject">GIS error in sequence 1</assign>
<assign to="mail-mime-sender">GIS_admin</assign>
<assign to="mail-mime-operation">build</assign>
<assign to="mail-mime-recipient">mirjana.vojvodic@tis.hr</assign>
</output>
<input message="inmsg">
<assign to="." from="*"></assign>
</input>
</operation>
<operation name="SMTP Send Adapter">
<participant name="SMTP_SEND_ADAPTER"/>
<output message="SMTP_SEND_ADAPTERInputMessage">
<assign to="." from="*"></assign>
<assign to="xport-smtp-mailto">mirjana.vojvodic@tis.hr</assign>
<assign to="xport-smtp-mailhost">192.168.100.128</assign>
<assign to="b2b-raw-message">true</assign>
<assign to="xport-smtp-mailport">25</assign>
</output>
<input message="inmsg">
<assign to="." from="*"></assign>
</input>
</operation>
</sequence>
</onFault>
</sequence>
<sequence name="secondSequence">
<assign to="secondSequenceVar_1">2_1</assign>
<operation name="XML Validation Service">
<participant name="XMLValidator_WellFormed"/>
<output message="XMLValidatorInputMessage">
<assign to="." from="*"></assign>
</output>
<input message="inmsg">
<assign to="." from="*"></assign>
</input>
</operation>
<assign to="secondSequenceVar_2">2_2</assign>
<onFault code="schema:validationerr">
<sequence>
<assign to="ERROR_SEQ2">XML validation error, Primary Document is not well-formed XML</assign>
</sequence>
</onFault>
<onFault>
<sequence name="Sequence Start">
<operation name="Business Process Metadata">
<participant name="BPMetaDataInfoService"/>
<output message="BPMetaDataServiceTypeInputMessage">
<assign to="." from="*"></assign>
<assign to="TRACE">TRUE</assign>
</output>
<input message="inmsg">
<assign to="." from="*"></assign>
</input>
</operation>
<operation name="XSLT Service">
<participant name="XSLTService"/>
<output message="XSLTServiceTypeInputMessage">
<assign to="." from="*"></assign>
<assign to="xslt_name">TEST_error</assign>
<assign to="xml_input_from">ProcData</assign>
<assign to="input_pd_xpath">/</assign>
</output>
<input message="inmsg">
<assign to="." from="*"></assign>
</input>
</operation>
<operation name="Mail Mime Service">
<participant name="MailMimeService"/>
<output message="MailMimeServiceInputMessage">
<assign to="." from="*"></assign>
<assign to="mail-mime-subject">GIS error in sequence 2</assign>
<assign to="mail-mime-sender">GIS_admin</assign>
<assign to="mail-mime-operation">build</assign>
<assign to="mail-mime-recipient">mirjana.vojvodic@tis.hr</assign>
</output>
<input message="inmsg">
<assign to="." from="*"></assign>
</input>
</operation>
<operation name="SMTP Send Adapter">
<participant name="SMTP_SEND_ADAPTER"/>
<output message="SMTP_SEND_ADAPTERInputMessage">
<assign to="." from="*"></assign>
<assign to="xport-smtp-mailto">mirjana.vojvodic@tis.hr</assign>
<assign to="xport-smtp-mailhost">192.168.100.128</assign>
<assign to="b2b-raw-message">true</assign>
<assign to="xport-smtp-mailport">25</assign>
</output>
<input message="inmsg">
<assign to="." from="*"></assign>
</input>
</operation>
</sequence>
</onFault>
</sequence>
</sequence>
</process>
OnFault group connected to the first sequence handles one specific error that is 'No files to collect' and a generic/default one.
OnFault group connected to the second sequence handles also one specific error i.e. 'schema:validationerr' and a generic/default one.
When filter in FSA is *.txt (that is a file that does not exists):
<assign to="filter">*.txt</assign>
... you can find that the the first (Assign) and the second (FSA) steps are executed from the first sequence, as error happened in teh FSA, BP continued with OnFault connected to that sequence. The second assign from that sequence has never been executed, but process continued with the second sequence. The second sequence also thrown an error and processed by its OnFault.
Process Monitor, BP flow:
Process Data in the end of the process is:
<?xml version="1.0" encoding="UTF-8"?>
<ProcessData>
<firstSequenceVar_1>1_1</firstSequenceVar_1>
<Prev_NotSuccess_Adv_Status>schema:validationerr</Prev_NotSuccess_Adv_Status>
<ERROR_SERVICE>
<WFD_NAME>TEST_onFault_twoSequences</WFD_NAME>
<SERVICE_NAME>FS_InstallValidation</SERVICE_NAME>
<STEP_ID>2</STEP_ID>
<ADV_STATUS>No files to collect</ADV_STATUS>
<BASIC_STATUS>1</BASIC_STATUS>
<WFC_ID>lin2:node1:12728cff242:5451536</WFC_ID>
<WFD_NAME>TEST_onFault_twoSequences</WFD_NAME>
<SERVICE_NAME>XMLValidator_WellFormed</SERVICE_NAME>
<STEP_ID>6</STEP_ID>
<ADV_STATUS>schema:validationerr</ADV_STATUS>
<BASIC_STATUS>1</BASIC_STATUS>
<WFC_ID>lin2:node1:12728cff242:5451580</WFC_ID>
</ERROR_SERVICE>
<ERROR_SEQ1>There is no files to collect from collection Folder!</ERROR_SEQ1>
<secondSequenceVar_1>2_1</secondSequenceVar_1>
<XMLValidationError>
<errorDetail>XML Validation: Failed to get primary document required for transaction to be completed.</errorDetail>
</XMLValidationError>
<ERROR_SEQ2>XML validation error, Primary Document is not well-formed XML</ERROR_SEQ2>
</ProcessData>
We can see that the second assign from both sequences (that would added values 1_2 and 2_2 into Process Data) were not run because every sequence stopped in the second step, i.e. FSA or XML Validation service and after that continued with OnFault.
Although steps from a sequnce will not be executed after a service that thrown an error, a new sequence in a BP will always be run, in spite of previous sequence that ended with an error.
If error happens in an OnFault group, then the whole process will stop and not continue with any new sequence. So condition to continue with the second sequence is that either the first sequence finish successfully or its OnFault processing part finish successfully.

