ode-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lei Wang <mail.lei.w...@gmail.com>
Subject Re: how to get the "supressJoinFailure" attribute from compiled .cbp file
Date Mon, 04 Aug 2014 21:59:46 GMT
Hi,

I tried the "compiledProcess.processScope.suppressJoinFailure"
I used the following BPEL file as a test, whatever the
"suppressJoinFailure" attribute is in the BPEL,
the "compiledProcess.processScope.suppressJoinFailure" JAVA OProcess Object
always returns "false".
The ODE library I use is the "master" branch in the git repository.

The BPEL source:
<bpel:process name="whileResponder"
    targetNamespace="http://www.utwente.nl/ewi/db/whileResponder"
    suppressJoinFailure="yes" xmlns:tns="
http://www.utwente.nl/ewi/db/whileResponder"
    xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
    <bpel:import location="whileResponderArtifacts.wsdl"
        namespace="http://www.utwente.nl/ewi/db/whileResponder" importType="
http://schemas.xmlsoap.org/wsdl/" />
    <bpel:correlationSets>
        <bpel:correlationSet name="CS" properties="tns:SN" />
    </bpel:correlationSets>
    <bpel:partnerLinks>
        <bpel:partnerLink name="whileResponder"
            partnerLinkType="tns:whileResponder" myRole="whileResponder" />
    </bpel:partnerLinks>
    <bpel:variables>
        <bpel:variable name="M1" messageType="tns:invoke1M1Message" />
        <bpel:variable name="M2" messageType="tns:invoke1M2Message" />
        <bpel:variable name="M3" messageType="tns:invoke2M3Message" />
        <bpel:variable name="M4" messageType="tns:invoke2M4Message" />
        <bpel:variable name="M5" messageType="tns:invoke3M5Message" />
    </bpel:variables>
    <bpel:sequence name="main">
        <bpel:pick createInstance="yes">
            <bpel:onMessage name="initReceive1" variable="M1"
                partnerLink="whileResponder" operation="invoke1">
                <bpel:correlations>
                    <bpel:correlation set="CS" initiate="yes" />
                </bpel:correlations>
                <bpel:sequence>
                    <bpel:assign>
                        <bpel:copy>
                            <bpel:from>
                                <bpel:literal>
                                    <tns:invoke1M2 xmlns:tns="
http://www.utwente.nl/ewi/db/whileResponder"
                                        xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance">
                                        <tns:output>tns:output</tns:output>
                                        <tns:SN>tns:SN</tns:SN>
                                    </tns:invoke1M2>
                                </bpel:literal>
                            </bpel:from>
                            <bpel:to variable="M2" part="payload" />
                        </bpel:copy>
                        <bpel:copy>
                            <bpel:from>$M1.payload/tns:SN</bpel:from>
                            <bpel:to>$M2.payload/tns:SN</bpel:to>
                        </bpel:copy>
                        <bpel:copy>
                            <bpel:from>$M1.payload/tns:input</bpel:from>
                            <bpel:to>$M2.payload/tns:output</bpel:to>
                        </bpel:copy>
                    </bpel:assign>
                    <bpel:reply name="initReply1"
partnerLink="whileResponder"
                        operation="invoke1" variable="M2" />
                    <bpel:receive name="initReceive2"
partnerLink="whileResponder"
                        operation="invoke2" variable="M3">
                        <bpel:correlations>
                            <bpel:correlation set="CS" initiatie="no" />
                        </bpel:correlations>
                    </bpel:receive>
                    <bpel:assign>
                        <bpel:copy>
                            <bpel:from>
                                <bpel:literal>
                                    <tns:invoke2M4 xmlns:tns="
http://www.utwente.nl/ewi/db/whileResponder"
                                        xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance">
                                        <tns:output>tns:output</tns:output>
                                        <tns:SN>tns:SN</tns:SN>
                                    </tns:invoke2M4>
                                </bpel:literal>
                            </bpel:from>
                            <bpel:to variable="M4" part="payload" />
                        </bpel:copy>
                        <bpel:copy>
                            <bpel:from>$M3.payload/tns:input</bpel:from>
                            <bpel:to>$M4.payload/tns:output</bpel:to>
                        </bpel:copy>
                        <bpel:copy>
                            <bpel:from>$M3.payload/tns:SN</bpel:from>
                            <bpel:to>$M4.payload/tns:SN</bpel:to>
                        </bpel:copy>
                    </bpel:assign>
                    <bpel:reply name="initReply2" operation="invoke2"
                        variable="M4" partnerLink="whileResponder" />
                </bpel:sequence>
            </bpel:onMessage>
            <bpel:onMessage partnerLink="whileResponder" variable="M5"
                operation="invoke3" name="initReceive3">
                <bpel:correlations>
                    <bpel:correlation set="CS" initiate="join" />
                </bpel:correlations>
                <bpel:exit />
            </bpel:onMessage>
        </bpel:pick>
        <bpel:while>
            <bpel:condition>1</bpel:condition>
            <bpel:pick>
                <bpel:onMessage name="receive1" variable="M1"
                    partnerLink="whileResponder" operation="invoke1">
                    <bpel:correlations>
                        <bpel:correlation set="CS" initiate="no" />
                    </bpel:correlations>
                    <bpel:sequence>
                        <bpel:assign>
                            <bpel:copy>
                                <bpel:from>$M1.payload/tns:SN</bpel:from>
                                <bpel:to>$M2.payload/tns:SN</bpel:to>
                            </bpel:copy>
                            <bpel:copy>
                                <bpel:from>$M1.payload/tns:input</bpel:from>
                                <bpel:to>$M2.payload/tns:output</bpel:to>
                            </bpel:copy>
                        </bpel:assign>
                        <bpel:reply name="reply1"
partnerLink="whileResponder"
                            operation="invoke1" variable="M2" />
                        <bpel:receive name="receive2"
partnerLink="whileResponder"
                            operation="invoke2" variable="M3">
                            <bpel:correlations>
                                <bpel:correlation set="CS" initiatie="no" />
                            </bpel:correlations>
                        </bpel:receive>
                        <bpel:assign>
                            <bpel:copy>
                                <bpel:from>$M3.payload/tns:input</bpel:from>
                                <bpel:to>$M4.payload/tns:output</bpel:to>
                            </bpel:copy>
                            <bpel:copy>
                                <bpel:from>$M3.payload/tns:SN</bpel:from>
                                <bpel:to>$M4.payload/tns:SN</bpel:to>
                            </bpel:copy>
                        </bpel:assign>
                        <bpel:reply name="reply2" operation="invoke2"
variable="M4"
                            partnerLink="whileResponder" />
                    </bpel:sequence>
                </bpel:onMessage>
                <bpel:onMessage partnerLink="whileResponder"
                    variable="M5" operation="invoke3" name="receive3">
                    <bpel:correlations>
                        <bpel:correlation set="CS" initiate="join" />
                    </bpel:correlations>
                    <bpel:exit />
                </bpel:onMessage>
            </bpel:pick>
        </bpel:while>
    </bpel:sequence>
</bpel:process>


The imported WSDL file (whileResponderArtifacts.wsdl):
<?xml version="1.0"?>
<definitions name="whileResponder"
    targetNamespace="http://www.utwente.nl/ewi/db/whileResponder"
    xmlns:vprop="http://docs.oasis-open.org/wsbpel/2.0/varprop" xmlns:xsd="
http://www.w3.org/2001/XMLSchema"
    xmlns:tns="http://www.utwente.nl/ewi/db/whileResponder" xmlns:plnk="
http://docs.oasis-open.org/wsbpel/2.0/plnktype"
    xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="
http://schemas.xmlsoap.org/wsdl/soap/">
    <types>
        <schema attributeFormDefault="unqualified"
elementFormDefault="qualified"
            targetNamespace="http://www.utwente.nl/ewi/db/whileResponder"
xmlns="http://www.w3.org/2001/XMLSchema">
            <element name="invoke1M1">
                <complexType>
                    <sequence>
                        <element name="input" type="string" />
                        <element name="SN" type="string" />
                    </sequence>
                </complexType>
            </element>
            <element name="invoke1M2">
                <complexType>
                    <sequence>
                        <element name="output" type="string" />
                        <element name="SN" type="string" />
                    </sequence>
                </complexType>
            </element>
            <element name="invoke2M3">
                <complexType>
                    <sequence>
                        <element name="input" type="string" />
                        <element name="SN" type="string" />
                    </sequence>
                </complexType>
            </element>
            <element name="invoke2M4">
                <complexType>
                    <sequence>
                        <element name="output" type="string" />
                        <element name="SN" type="string" />
                    </sequence>
                </complexType>
            </element>
            <element name="invoke3M5">
                <complexType>
                    <sequence>
                        <element name="input" type="string" />
                        <element name="SN" type="string" />
                    </sequence>
                </complexType>
            </element>
        </schema>
    </types>
    <message name="invoke1M1Message">
        <part name="payload" element="tns:invoke1M1" />
    </message>
    <message name="invoke1M2Message">
        <part name="payload" element="tns:invoke1M2" />
    </message>
    <message name="invoke2M3Message">
        <part name="payload" element="tns:invoke2M3" />
    </message>
    <message name="invoke2M4Message">
        <part name="payload" element="tns:invoke2M4" />
    </message>
    <message name="invoke3M5Message">
        <part name="payload" element="tns:invoke3M5" />
    </message>
    <portType name="whileResponder">
        <operation name="invoke1">
            <input message="tns:invoke1M1Message" />
            <output message="tns:invoke1M2Message" />
        </operation>
        <operation name="invoke2">
            <input message="tns:invoke2M3Message" />
            <output message="tns:invoke2M4Message" />
        </operation>
        <operation name="invoke3">
            <input message="tns:invoke3M5Message" />
        </operation>
    </portType>
    <plnk:partnerLinkType name="whileResponder">
        <plnk:role name="whileResponder" portType="tns:whileResponder" />
    </plnk:partnerLinkType>
    <vprop:property name="SN" type="xsd:string" />
    <vprop:propertyAlias propertyName="tns:SN"
        messageType="tns:invoke1M1Message" part="payload">
        <vprop:query>tns:SN</vprop:query>
    </vprop:propertyAlias>
    <vprop:propertyAlias propertyName="tns:SN"
        messageType="tns:invoke2M3Message" part="payload">
        <vprop:query>tns:SN</vprop:query>
    </vprop:propertyAlias>
    <vprop:propertyAlias propertyName="tns:SN"
        messageType="tns:invoke3M5Message" part="payload">
        <vprop:query>tns:SN</vprop:query>
    </vprop:propertyAlias>
    <binding name="whileResponderBinding" type="tns:whileResponder">
        <soap:binding style="document"
            transport="http://schemas.xmlsoap.org/soap/http" />
        <operation name="invoke1">
            <soap:operation
                soapAction="
http://www.utwente.nl/ewi/db/whileResponder/invoke1" />
            <input>
                <soap:body use="literal" />
            </input>
            <output>
                <soap:body use="literal" />
            </output>
        </operation>
        <operation name="invoke2">
            <soap:operation
                soapAction="
http://www.utwente.nl/ewi/db/whileResponder/invoke2" />
            <input>
                <soap:body use="literal" />
            </input>
            <output>
                <soap:body use="literal" />
            </output>
        </operation>
        <operation name="invoke3">
            <soap:operation
                soapAction="
http://www.utwente.nl/ewi/db/whileResponder/invoke3" />
            <input>
                <soap:body use="literal" />
            </input>
        </operation>
    </binding>
    <service name="whileResponderService">
        <port name="whileResponderPort" binding="tns:whileResponderBinding">
            <soap:address location="
http://localhost:8080/ode/processes/whileResponder" />
        </port>
    </service>
</definitions>



On Mon, Aug 4, 2014 at 7:59 PM, Tammo van Lessen <tvanlessen@gmail.com>
wrote:

> Hi,
>
> 'compiledProcess.processScope.suppressJoinFailure' should do the job.
>
> Please bear in mind that the compiler does some (minor) optimizations. The
> fault handling of invokes is for instance implemented by wrapping the
> invoke with an implicit scope activity. The receive is replaced by a
> pick-activity with exactly one onMessage element and other of the like.
>
> HTH,
>   Tammo
>
>
> On Mon, Aug 4, 2014 at 7:47 PM, Lei Wang <mail.lei.wang@gmail.com> wrote:
>
> > Hi,
> >
> >
> > I want some help on how to get the "supressJoinFailure" attribute value
> > from a compiled .cbp file.
> > What I have done:
> >
> > //Compile a bpel process into .cbp
> > BpelC bpelC = BpelC.newBpelCompiler();
> > bpelC.compile(bpelFile, 2);
> > //read the compiled file as a OProcess Object
> > Serializer ofh = new Serializer(new FileInputStream(cbpPath));
> > OProcess compiledProcess = ofh.readOProcess();
> >
> >
> > The motivation is use ODE library to get a JAVA Object representation of
> > BPEL process.
> > Then I want to do some static analysis based on the JAVA representation.
> > The question is, how can I get the process attribute of
> > "supressJoinFailure" attribute of JAVA OProcess class.
> >
> >
> >
> > Best Regards
> >
> >
> > Lei Wang
> >
>
>
>
> --
> Tammo van Lessen - http://www.taval.de
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message