7 Replies Latest reply on Jan 24, 2013 3:57 PM by Jeff DeLong

    Required transformation missing message in Visual Editor

    Jeff DeLong Master

      In the following model PolicyQuoteProcess implements the interface

       

      public Policy receivePolicyQuote(Policy policy);

       

      while PolicyQuoteEntityService implements the interface

       

      PolicyQuote storePolicyQuote(PolicyQuote policyquote);

       

      The former is a BPM Service, and translates the Policy into PolicyQuote (the same could happen in a Bean service).

       

      However the tooling complains:

       

      Required transformation missing ...

       

       

      JPAReference.png

        • 1. Re: Required transformation missing message in Visual Editor
          Keith Babo Master

          The transformer pair is formed by comparing the contract for the consumer and the contract for the provider.  In the above picture, that resolves to:

           

          consumer : the interface specified on the PolicyQuoteEntityService reference in the PolicyQuoteProcess component

          provider : the interface specified on the composite reference binding for PolicyQuoteEntityService

           

          If the types match there and you're still getting this error, could you send us the app to debug further?

          • 2. Re: Required transformation missing message in Visual Editor
            Jeff DeLong Master

            In trying to resolve this (by deleleting reference and re-adding) I am running into a problem with Visual Editor that i have seen before. That is I add a composite reference, then add a component reference, and the component reference does not show up in visual model, but when I look at the source, it is there in the xml.

             

            NoReferenceIcon.png

             

             

            <?xml version="1.0" encoding="UTF-8"?>

            <switchyard xmlns="urn:switchyard-config:switchyard:1.0" xmlns:bean="urn:switchyard-component-bean:config:1.0" xmlns:bpm="urn:switchyard-component-bpm:config:1.0" xmlns:camel="urn:switchyard-component-camel:config:1.0" xmlns:jpa="urn:switchyard-component-camel-jpa:config:1.0" xmlns:rules="urn:switchyard-component-rules:config:1.0" xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200912" xmlns:soap="urn:switchyard-component-soap:config:1.0" xmlns:transform="urn:switchyard-config:transform:1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="PolicyQuoteProcessService" targetNamespace="urn:org.acme.insurance:PolicyQuoteProcessService:0.0.1-SNAPSHOT">

              <sca:composite name="PolicyQuoteProcessService" targetNamespace="urn:org.acme.insurance:PolicyQuoteProcessService:0.0.1-SNAPSHOT">

                <sca:component name="PolicyQuoteProcess">

                  <bpm:implementation.bpm persistent="true" processId="org.acme.insurance.policyQuoteProcess">

                    <bpm:actions>

                      <bpm:action operation="receivePolicyQuote" type="START_PROCESS">

                        <bpm:inputs>

                          <bpm:mapping expression="" expressionType="MVEL" scope="IN" variable="policy"/>

                        </bpm:inputs>

                        <bpm:outputs>

                          <bpm:mapping expression="" variable="policy"/>

                        </bpm:outputs>

                      </bpm:action>

                      <bpm:action operation="receiveDrivingRecord" type="SIGNAL_EVENT">

                        <bpm:inputs>

                          <bpm:mapping expression="" variable="drivingRecordResponse"/>

                        </bpm:inputs>

                      </bpm:action>

                    </bpm:actions>

                    <bpm:listeners>

                      <bpm:listener class="classname"/>

                    </bpm:listeners>

                    <bpm:loggers>

                      <bpm:logger interval="2000" log="NewLogger" type="CONSOLE"/>

                    </bpm:loggers>

                    <bpm:manifest>

                      <bpm:resources>

                        <bpm:resource location="policyQuoteProcess.bpmn2" type="BPMN2"/>

                      </bpm:resources>

                    </bpm:manifest>

                    <bpm:properties>

                      <bpm:property name="property" value="value"/>

                    </bpm:properties>

                    <bpm:workItemHandlers>

                      <bpm:workItemHandler class="NewTaskHandler"/>

                    </bpm:workItemHandlers>

                  </bpm:implementation.bpm>

                  <sca:service name="PolicyQuoteProcessService">

                    <sca:interface.java interface="org.acme.insurance.PolicyQuoteProcessService.PolicyQuoteProcessService"/>

                  </sca:service>

                  <sca:reference name="PolicyQuoteCalculationService">

                    <sca:interface.java interface="org.acme.insurance.PolicyQuoteCalculationService.PolicyQuoteCalculationService"/>

                  </sca:reference>

                  <sca:reference name="DrivingRecordServiceStub">

                    <sca:interface.java interface="org.acme.insurance.DrivingRecordService.DrivingRecordService"/>

                  </sca:reference>

                  <sca:reference name="PolicyQuoteEntityService">

                    <sca:interface.java interface="org.acme.insurance.PolicyQuoteEntityService.PolicyQuoteEntityService"/>

                  </sca:reference>

                </sca:component>

                <sca:component name="PolicyQuoteCalculation">

                  <rules:implementation.rules>

                    <rules:manifest/>

                  </rules:implementation.rules>

                  <sca:service name="PolicyQuoteCalculationService">

                    <sca:interface.java interface="org.acme.insurance.PolicyQuoteCalculationService.PolicyQuoteCalculationService"/>

                  </sca:service>

                </sca:component>

                <sca:service name="PolicyQuoteProcessService" promote="PolicyQuoteProcess/PolicyQuoteProcessService">

                  <sca:interface.wsdl interface="WEB-INF/wsdl/PolicyQuoteProcess_PolicyQuoteProcessService.wsdl#wsdl.porttype(PolicyQuoteProcessService)"/>

                  <soap:binding.soap>

                    <soap:contextMapper/>

                    <soap:wsdl>WEB-INF/wsdl/PolicyQuoteProcess_PolicyQuoteProcessService.wsdl</soap:wsdl>

                    <soap:wsdlPort>PolicyQuoteProcessServicePort</soap:wsdlPort>

                    <soap:socketAddr>:18001</soap:socketAddr>

                    <soap:contextPath>PolicyQuoteProcessServiceService/PolicyQuoteProcessServicePort</soap:contextPath>

                  </soap:binding.soap>

                </sca:service>

                <sca:service name="DrivingRecordCallbackService" promote="PolicyQuoteProcess/PolicyQuoteProcessService">

                  <sca:interface.wsdl interface="WEB-INF/wsdl/PolicyQuoteProcess_PolicyQuoteProcessService.wsdl#wsdl.porttype(DrivingRecordCallbackService)"/>

                  <soap:binding.soap>

                    <soap:contextMapper/>

                    <soap:messageComposer/>

                    <soap:wsdl>WEB-INF/wsdl/PolicyQuoteProcess_PolicyQuoteProcessService.wsdl</soap:wsdl>

                    <soap:wsdlPort>DrivingRecordCallbackServicePort</soap:wsdlPort>

                    <soap:contextPath>PolicyQuoteProcessServiceService/DrivingRecordCallbackServicePort</soap:contextPath>

                  </soap:binding.soap>

                </sca:service>

                <sca:reference name="DrivingRecordService" multiplicity="0..1" promote="DrivingRecordRoute/DrivingRecordService">

                  <sca:interface.wsdl interface="wsdl/PolicyQuoteProcess_DrivingRecordService.wsdl#wsdl.porttype(DrivingRecordService)"/>

                  <soap:binding.soap>

                    <soap:contextMapper/>

                    <soap:wsdl>wsdl/PolicyQuoteProcess_DrivingRecordService.wsdl</soap:wsdl>

                    <soap:wsdlPort>DrivingRecordServicePort</soap:wsdlPort>

                  </soap:binding.soap>

                </sca:reference>

                <sca:component name="DrivingRecordRoute">

                  <camel:implementation.camel>

                    <camel:xml path="DrivingRecordRoute.xml"/>

                  </camel:implementation.camel>

                  <sca:service name="DrivingRecordServiceStub">

                    <sca:interface.java interface="org.acme.insurance.DrivingRecordService.DrivingRecordService"/>

                  </sca:service>

                  <sca:reference name="DrivingRecordService">

                    <sca:interface.wsdl interface="wsdl/PolicyQuoteProcess_DrivingRecordService.wsdl#wsdl.porttype(DrivingRecordService)"/>

                  </sca:reference>

                </sca:component>

                <sca:reference name="PolicyQuoteEntityService" multiplicity="0..1">

                  <sca:interface.java interface="org.acme.insurance.PolicyQuoteEntityService.PolicyQuoteEntityService"/>

                  <jpa:binding.jpa>

                    <jpa:contextMapper/>

                    <jpa:entityClassName>org.acme.insurance.PolicyQuote</jpa:entityClassName>

                    <jpa:persistenceUnit>org.jbpm.persistence.jpa</jpa:persistenceUnit>

                    <jpa:produce>

                      <jpa:flushOnSend>false</jpa:flushOnSend>

                      <jpa:usePersist>false</jpa:usePersist>

                    </jpa:produce>

                  </jpa:binding.jpa>

                </sca:reference>

              </sca:composite>

              <transforms>

                <transform:transform.smooks from="{http://www.example.org/policyQuote}policyQuote" to="java:org.acme.insurance.Policy" type="XML2JAVA" config="smooks/PolicyQuoteConfigSmooks.xml"/>

                <transform:transform.smooks from="java:org.acme.insurance.Policy" to="{http://www.example.org/policyQuote}policyQuoteReply" type="SMOOKS" config="smooks/PolicyQuoteReplyConfigSmooks.xml"/>

                <transform:transform.jaxb from="{http://dmv.com/drivingRecord}drivingRecordResponse" to="java:dmv.com.DrivingRecordResponseType" contextPath="dmv.com"/>

                <transform:transform.jaxb from="java:dmv.com.DrivingRecordRequestType" to="{http://dmv.com/drivingRecord}drivingRecordRequest"/>

              </transforms>

              <domain>

                <handlers>

                  <handler class="org.switchyard.handlers.MessageTrace" name="MessageTrace"/>

                </handlers>

              </domain>

            </switchyard>

             

             

            If I re-add it visually, I will wind up with two component references in the xml, and if I then promote the reference (wire the component reference to the composite), at first it looks fine:

             

             

             

             

             

             

            referenceWithIcon.png

             

            But if I close and re-open the model, i see the following:

             

            twoReferences.png

            • 3. Re: Required transformation missing message in Visual Editor
              Rob Cernich Master

              Hey Jeff,

               

              Could you please file a JIRA?  Also, could you check the Eclipse log file to see if there are any SwitchYard related exceptions in there?

               

              Thanks,

              Rob

              • 5. Re: Required transformation missing message in Visual Editor
                Jeff DeLong Master

                Perhaps it is a layout problem. Perhaps the Reference icon is on the diagram, but overlaying the other reference icon on the component. If I fix the model my hand in XML editor, when I open in Visual Editor it looks like:

                OverlappingReference.png

                 

                Perhaps there are two icons there, just taking up the same location?

                • 6. Re: Required transformation missing message in Visual Editor
                  Rob Cernich Master

                  Hey Jeff,

                   

                  I'm almost certain you are correct (there would be an error saying something like the target of the reference was ambiguous).  I'll review the layout/update code for references to make sure this does not happen.

                   

                  As a workaround, you can nuke the .xml folder in your project and reopen the editor.  This will cause the diagram to be recreated.

                   

                  Thanks for finding that!

                   

                  Rob

                  • 7. Re: Required transformation missing message in Visual Editor
                    Jeff DeLong Master

                    Rob,

                     

                    Thanks for the tip on removing the .xml folder, I was wondering where the graphical information was being stored. I am using a Mac, so .folder are hidden from the file browser (so I often don't realize what is there). That did allow the model to be drawn correctly

                     

                    CorrectModel.png