JObManager is not working in LiveCycle ES2


hi,

 

i using flex form send mail. want know status of mail whether success or failure. using jobmanager remote destination status , response.

 

as process submitted invoking jobmanager.getstatus(jobid), resulting falut event.

 

[rpc fault faultstring="dsc invocation resulted in error: class flex.messaging.messageexception : operation getstatus not have parameter called persistent" faultcode="server.processing" faultdetail="null"]

 

i can see in console "referenceerror: error #1056: cannot create property lcjobid on mx.rpc.livecycle.jobid."

 

anybody having same isssue. please me out.

 

 

i placing flex app code.

 

<?xml version="1.0" encoding="utf-8"?>
<mx:application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical"
    backgroundgradientcolors="[#ffffff,#000000]" backgroundgradientalphas="[1,0.5]"
    creationcomplete="initapp()" >
   
    <mx:script>
        <![cdata[
            import flash.net.registerclassalias;
            import mx.rpc.livecycle.jobstatus;
            import mx.rpc.livecycle.jobid;
            import mx.messaging.subscriptioninfo;
            import mx.controls.alert;
            import mx.messaging.channels.amfchannel;
            import mx.messaging.channelset;
            import mx.rpc.events.faultevent;
            import mx.rpc.events.resultevent;
           
            private function initapp():void
            {
               var amfchannel:amfchannel = new amfchannel(null,
                   "http://localhost:8080/remoting/messagebroker/amf");
                var channelset:channelset = new channelset();
                channelset.addchannel(amfchannel);
                lcesremote.channelset = channelset;
                jmservice.channelset = channelset;
            }
           
            private function onresult(event:resultevent):void
            {
                alert.show(event.result.tostring() );
            }
           
            private function onfault(event:faultevent):void
            {
                alert.show(event.fault.tostring());
            }
            
            public var ji:jobid = new jobid();
            private function oninvoke(event:resultevent):void
            {
                //alert.show("process submitted!!!" );
                ji.jobid = (event.result jobid).jobid;
                ji.persistent = true;
                jmservice.getstatus(event.result);    
            }
           
            private function sendmessage(event:mouseevent) : void
            {
                messagexml.from = txtfrom.text;
                messagexml.to = txtto.text;
                messagexml.subject = txtsubject.text;
                messagexml.message = txtmessage.text;
               
                var param:object = new object();
                param['messagedata'] = messagexml;
                lcesremote.invoke_async(param);
               
            }
           
           
            private function getstatushandler(event:resultevent):void
            {                
                var res:jobstatus = event.result jobstatus;
                var resint:int = res.statuscode;
              
                if(res.statuscode == jobstatus.job_status_completed)
                {
                  jmservice.getresponse(ji);
                }
            }
           
             private function getresponsehandler(event:resultevent):void
             {                      
               
             }   
        ]]>
    </mx:script>
   
    <mx:xml id="messagexml">
        <data>
            <from></from>
            <to></to>
            <subject></subject>
            <message></message>
        </data>
    </mx:xml>
   
    <mx:remoteobject id="lcesremote" destination="mailingservice/process/emailprocess"
            result="onresult(event)" fault="onfault(event)">
        <mx:method name="invoke_async" result="oninvoke(event)" />
    </mx:remoteobject>
   
    <mx:remoteobject id="jmservice" destination="jobmanager" showbusycursor="true" fault="onfault(event)">
       <mx:method name="getstatus" result="getstatushandler(event)"/>
       <mx:method name="getresponse" result="getresponsehandler(event)"/>
       </mx:remoteobject>
   
   
    <mx:hbox width="100%">
        <mx:label text="from:" width="62"/>
        <mx:textinput id="txtfrom"  width="333"/>
    </mx:hbox>
    <mx:hbox width="100%">
        <mx:label text="to:" width="62"/>
        <mx:textinput id="txtto"  text="testlces@gmail.com" width="333"/>
    </mx:hbox>
    <mx:hbox width="100%">
        <mx:label text="subject:" width="62"/>
        <mx:textinput id="txtsubject"  width="333"/>
    </mx:hbox>
    <mx:hbox width="100%" >
        <mx:label text="message:" width="62"/>
        <mx:textarea id="txtmessage"  height="226" width="333"/>
    </mx:hbox>
    <mx:hbox width="100%" >
        <mx:spacer width="62"/>
        <mx:button id="btnsend" label="send" click="sendmessage(event)" />
    </mx:hbox>
   
</mx:application>



More discussions in LiveCycle APIs


adobe

Comments

Popular posts from this blog

CS5 Adobe Media Encoder: Encode failed because the source duration is nil.

cf_sql_integer vs cf_sql_bigint vs cf_sql_int??

localhost/joomla15/administrator doesnt work - Joomla! Forum - community, help and support