Hi Tammo,

thanks for the approach explanation i have do it using the approach now
there is not any more
javascript flying i the html code. The code is very clean now
please look at it a let go forward if possible

Thanks
Duplex

On Thu, Aug 13, 2015 at 10:41 PM, Tammo van Lessen <tvanles...@gmail.com>
wrote:

> Hi Duplex,
>
> the link name could be looked up using an XPath expression, e.g.
> ./bpel:sources/bpel:source/@linkName should return the name of the source
> links.
>
> For the HTML output I see two options:
>
> a) You adopt the data model from BPEL and add two attributes to the HTML
> with a comma-separated list of source and target link names. This could
> look like this:
>
> <div id="pr-1.sq-1.fw-1.empty-1" class="bpel expand bpel_empty"
> data-sources="toBuyConfirm,toSellConfirm" data-targets="
> buyToSettle,sellToSettle">
>
> The following links could help to create such lists:
>
> http://stackoverflow.com/questions/666584/how-do-i-generate-a-comma-separated-list-with-xslt-xpath
>
> b) You add a data attribute that contains a list of activities the current
> activities link to. Eg:
> <div id="pr-1.sq-1.fw-1.empty-1" class="bpel expand bpel_empty"
> data-connectTo="pr-1.sq-1.fw-1.sq.receive-1,pr-1.sq-1.fw-1.receive">
>
> For a) you need to do the lookups at the javascript side, i.e. for each
> activity that has a data-sources attribute you iterate over the list of
> link names and search all nodes that have that linkName present in a
> data-targets attribute. Get the id of those nodes and pass it to jsplumbs
> connect method.
>
> For b) you have the IDs already directly in the element, i.e. you can
> iterate over all activities that have a non-empty data-connectTo attribute
> and create jsplumb connections from the current element to all elements
> with the IDs in the connectTo attribute. This is a bit more work on the
> XSLT side because you need to do the lookups already with XPath.
>
> I guess option a) is slightly more straight forward.
>
> HTH,
>   Tammo
>
> On Thu, Aug 13, 2015 at 1:03 PM, tony pro <tony14...@gmail.com> wrote:
>
> > Ok from the Flow-GraphExample.bpel file we have this inside the flow
> > component
> >
> >
> >
> >
> ****************************************************************************code
> > start
> >
> >
> **************************************************************************************
> > <flow name="Flow" suppressJoinFailure="yes">
> >             <links>
> >                 <link name="buyToSettle" />
> >                 <link name="sellToSettle" />
> >                 <link name="toBuyConfirm" />
> >                 <link name="toSellConfirm" />
> >             </links>
> >
> >             <!-- Buyer and seller information in parallel -->
> >             <sequence>
> >                 <receive name="receiveBuyerInformation"
> >  partnerLink="MyRoleLink" operation="startProcessSync"
> > portType="ti:TestInterfacePortType" variable="BuyerInformationRequest">
> >                     <sources>
> >                         <source linkName="buyToSettle" />
> >                     </sources>
> >                     <correlations>
> >                         <correlation set="CorrelationSet" initiate="no"/>
> >                     </correlations>
> >                 </receive>
> >                 <assign name="AssignBuyerInformationReplyData">
> >                     <copy>
> >                         <from>$BuyerInformationRequest.inputPart</from>
> >                         <to variable="BuyerInformationResponse"
> > part="outputPart"/>
> >                     </copy>
> >                 </assign>
> >                 <reply name="ReplyToReceiveBuyerInformation"
> > partnerLink="MyRoleLink" operation="startProcessSync"
> > portType="ti:TestInterfacePortType" variable="BuyerInformationResponse"/>
> >             </sequence>
> >             <receive name="receiveSellerInformation"
> >  partnerLink="MyRoleLink" operation="startProcessAsync"
> > portType="ti:TestInterfacePortType" variable="SellerInformationRequest">
> >                 <sources>
> >                     <source linkName="sellToSettle" />
> >                 </sources>
> >                 <correlations>
> >                     <correlation set="CorrelationSet" initiate="no"/>
> >                 </correlations>
> >             </receive>
> >
> >             <!-- Merge the requests -->
> >             <empty name="settleTrade" partnerLink="MyRoleLink" >
> >                 <targets>
> >                     <joinCondition>$buyToSettle and
> > $sellToSettle</joinCondition>
> >                         <target linkName="buyToSettle" />
> >                         <target linkName="sellToSettle" />
> >                 </targets>
> >                 <sources>
> >                     <source linkName="toBuyConfirm" />
> >                     <source linkName="toSellConfirm" />
> >                 </sources>
> >             </empty>
> >
> >             <!-- Reply the result. We need an extra invocation here,
> > because in the test setting, buyer and seller are
> >             the same entity which would deadlock itself if each request
> is
> > synchronous. The purpose of this test is to
> >             verify the correct processing of links and parallelism  -->
> >             <sequence>
> >                 <receive name="confirmBuyerInformation"
> >  partnerLink="MyRoleLink" operation="startProcessSync"
> > portType="ti:TestInterfacePortType" variable="BuyerInformationRequest">
> >                     <targets>
> >                         <target linkName="toBuyConfirm" />
> >                     </targets>
> >                     <correlations>
> >                         <correlation set="CorrelationSet" initiate="no"/>
> >                     </correlations>
> >                 </receive>
> >                 <assign name="AssignConfirmBuyerInformationReplyData">
> >                     <copy>
> >                         <from>$BuyerInformationRequest.inputPart</from>
> >                         <to variable="BuyerInformationResponse"
> > part="outputPart"/>
> >                     </copy>
> >                 </assign>
> >                 <reply name="ReplyToConfirmBuyerInformation"
> > partnerLink="MyRoleLink" operation="startProcessSync"
> > portType="ti:TestInterfacePortType" variable="BuyerInformationResponse"/>
> >             </sequence>
> >             <receive name="confirmSellerInformation"
> >  partnerLink="MyRoleLink" operation="startProcessAsync"
> > portType="ti:TestInterfacePortType" variable="SellerInformationRequest">
> >                 <targets>
> >                     <target linkName="toSellConfirm" />
> >                 </targets>
> >                 <correlations>
> >                     <correlation set="CorrelationSet" initiate="no"/>
> >                 </correlations>
> >             </receive>
> > </flow>
> >
> >
> >
> *******************************************************************************end
> > of
> >
> >
> code********************************************************************************************************
> >
> > from here we have source and target components like this
> >
> > ******************************source***********************************
> > receive name="receiveBuyerInformation"  partnerLink="MyRoleLink"
> > operation="startProcessSync" portType="ti:TestInterfacePortType"
> > variable="BuyerInformationRequest">
> >                     <sources>
> >                         <source linkName="buyToSettle" />
> >                     </sources>
> >                     <correlations>
> >                         <correlation set="CorrelationSet" initiate="no"/>
> >                     </correlations>
> >                 </receive>
> >
> > **********************************or
> > target*********************************
> > <receive name="confirmBuyerInformation"  partnerLink="MyRoleLink"
> > operation="startProcessSync" portType="ti:TestInterfacePortType"
> > variable="BuyerInformationRequest">
> >        <targets>
> >               <target linkName="toBuyConfirm" />
> >        </targets>
> >        <correlations>
> >               <correlation set="CorrelationSet" initiate="no"/>
> >        </correlations>
> > </receive>
> >
> >
> > -------------------------------------------The problem is that
> >
> --------------------------------------------------------------------------
> > I need to know that which activities(receive, assign, reply, etc..) is
> > having a source tag on it and which one is having the target
> corresponding
> > to a particullar source
> > So, if i knew how i can know that this activity is the source to the
> > particular target activity, by passing a data-link to that particular
> > activity it will be possible for me to
> > link the using that javascript after the htnnl file have been generated.
> >
> > ------------------------------------------My
> >
> >
> approach---------------------------------------------------------------------
> > I realized that each link has a attribute name(which optional) like here
> >  <link name="buyToSettle" />
> >  <link name="toBuyConfirm" />
> >  <link name="toSellConfirm" />
> >
> > and each of that attribute(value for example "buyToSettle")  will be on
> the
> > linkName attribute of each source or target tag of the bpel file like
> here:
> > linkName="buyToSettle"
> > Since JsPlumb links element only with they Id's, I have to get the source
> > element that has the linkName attribute =  name attribute of the link tag
> > and from there
> > i can get the id of that activity. that is how i am taking it.
> >
> > NB: hope that the linkName attribute is not also optional.
> >
> > Question is it possible to to add a data-link atribute that has the same
> > value as the attribute name of the link tag to the source and target
> > activity while generating the html file ?
> > --
> >
> > + <tony14...@gmail.com>237 70274538
> > Univertity of Buea Cameroon
> > https://kamdjou-resume.firebaseapp.com/
> >
>
>
>
> --
> Tammo van Lessen - http://www.taval.de
>



-- 

+ <tony14...@gmail.com>237 70274538
Univertity of Buea Cameroon
https://kamdjou-resume.firebaseapp.com/

Reply via email to