package com.acme.intg.processes; 

import com.bea.control.ServiceBrokerControl;
import com.bea.jpd.JpdContext;
import com.bea.data.RawData;
import com.bea.wli.control.broker.MessageBroker;
import com.bea.wli.jpd.Callback;
import com.bea.wli.jpd.CallbackInterface;
import com.bea.xml.XmlObjectList;
import org.apache.beehive.controls.api.bean.Control;
import org.apache.beehive.controls.api.events.EventHandler;
import org.apache.xmlbeans.XmlObject;
import com.acme.logging.AppLogger;

/**
 * @author Selvan V. Rajan
 * @version 1.0 
 * @jpd:process process::
 * <process name="ConvertNonXMLToXML">
 *   <clientRequest name="Client Request with Return" method="clientRequest" returnMethod="clientReturn">
 *     <controlSend name="NonXML Conversion to XML" method="nonXMLtoXMLConvertNonXMLtoXML"/>
 *   </clientRequest>
 * </process>::
 */
@com.bea.wli.jpd.Process(process = "<process name=\"ConvertNonXMLToXML\"> " +
                                   "  <clientRequest name=\"Client Request with Return\" method=\"clientRequest\" returnMethod=\"clientReturn\"> " +
                                   "    <controlSend name=\"NonXML Conversion to XML\" method=\"nonXMLtoXMLConvertNonXMLtoXML\"/> " +
                                   "  </clientRequest> " +
                                   "</process>")
public class ConvertNonXMLToXML implements com.bea.jpd.ProcessDefinition
{
    public com.bea.data.RawData inboundRawMsg;

    public com.acme.authorizationService.AuthorizationMessageDocument inboundXMLDoc;

    static final long serialVersionUID = 1L;
    
    @com.bea.wli.jpd.Callback()
    public Callback callback;
    
    static AppLogger logger = new AppLogger("ConvertNonXMLToXML");
    /*
     * The area above this comment contains Variable Declarations created from the Design View.
     * The area below this comment contains Control Declarations created from the Design View.
     * 
     * Code in these areas is generated automatically.
     * 
     * 2-Way editing is fully supported in these areas of code.
     * Warning: changing Process Variables and Control Declarations already in use by your application
     * may generate errors in your application if you do not update these declarations
     * in all locations where they are used.
     */
    
    /**
     * @jpd:transform
     */
    @com.bea.wli.jpd.Transform()
    private com.acme.intg.transformations.NonXMLtoXML nonXMLtoXML;

    /**
     * @common:context
     */
    @com.bea.wli.jpd.Context()
    JpdContext context; //(..control insertion marker - do not modify this line)
    
    /*
     * The area below this comment contains java methods referenced by communication nodes in the Process Language.
     *
     * Code in this area is generated automatically.
     *
     * 2-Way editing is partially supported in this area of code.
     * Warning: you can safely add code inside a method body but it must be outside of any PROTECTED SECTION
     * block comments. Modifications to code within these comments will prevent you from viewing information
     * in the Design View builder that generated this code.
     */


    public com.acme.authorizationService.AuthorizationMessageDocument clientReturn()
    {
        //#START: CODE GENERATED - PROTECTED SECTION - you can safely add code above this comment in this method. #//
        // return
        return inboundXMLDoc;
        //#END  : CODE GENERATED - PROTECTED SECTION - you can safely add code below this comment in this method. #//
    }







    public void clientRequest(com.bea.data.RawData x0) throws Exception
    {
        //#START: CODE GENERATED - PROTECTED SECTION - you can safely add code above this comment in this method. #//
        // input transform
        // parameter assignment
        this.inboundRawMsg = x0;
        //#END  : CODE GENERATED - PROTECTED SECTION - you can safely add code below this comment in this method. #//
    }








    public void nonXMLtoXMLConvertNonXMLtoXML() throws Exception
    {
        //#START: CODE GENERATED - PROTECTED SECTION - you can safely add code above this comment in this method. #//
        // input transform
        // return method call
        this.inboundXMLDoc = nonXMLtoXML.convertNonXMLtoXML(ccinboundrawmessage.CCInboundMessageMflObject.newInstance(this.inboundRawMsg));
        // output transform
        // output assignments
        //#END  : CODE GENERATED - PROTECTED SECTION - you can safely add code below this comment in this method. #//
    }

	@CallbackInterface()
    public interface Callback extends ServiceBrokerControl //(..region end marker - do not modify this line)
    {
    }
    
    /*
     * Code inserted below this comment is for methods corresponding to Perform or Condition nodes
     * created in the Design View.
     *
     * Feel free to make modifications or add new code here.
     */
    
} 
