Trading network

I have a problem I send a document to TN it went well and you can see the way that I undertook on the attachment and it works well, now I want to make a flow to be carried out " processing rule "that allows you to retrieve an attribute of document and write on the hard drive and it does not.
CCC.Utils.utils: WriteFile is an internal development that I have used essential

I hCould not run ‘ExtractOrder’.
com.wm.app.tn.err.EXMLException:

wm.tn.doc:getContentPart

com.wm.app.b2b.server.ServiceException
“bizdoc” is required.
com.wm.app.b2b.server.ServiceException: “bizdoc” is required.
at wm.tn.doc.getContentPart(doc.java:387)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.wm.app.b2b.server.JavaService.baseInvoke(JavaService.java:287)
at com.wm.app.b2b.server.invoke.InvokeManager.process(InvokeManager.java:554)
at com.wm.app.b2b.server.invoke.StatisticsProcessor.process(StatisticsProcessor.java:44)
ave this error:

Hi,

Is your processing rule service is ‘Extract order’? you need to define bizdoc variable in you service to get the data from TN. TN places the content of document in bizdoc in pipeline. you need to map ‘content’ from this bizdoc.

HTH

Cheers!:slight_smile:

Now I have another error :
“Could not’ExtractOrder’.java.lang.NullPointerException” that I not correct I think it’s the file name which is not clearly see the details of the error on the attached file

Hi,

Just do this…

  • use “save pipeline and restore pipe line steps” and find out what data is coming to your service.
  • if it’s only bizdoc, then use “bizdoc envelope” as input document to your service to fetch that data.
  • if node is coming then take “object” as input to the service and name that object as “node”.
  • if you are getting node…then use the funcion xmlNodetoDocument function and fecth that data in the document…
  • do the mapping logic whatever you want with that document…

on “ExtractOrder” I put:

SavePipeLineTofile
RestorePipeLinefromFile
getContentPart
CCC.Utils.utils: WriteFile (to write on a file)

I run when I have the following error: “java.lang.NullPointerException”
and when I do " trace to here" I have the result on the attached file
What I have to input?

Hi,

Have you defined wm.tn.rec:BizDocEnvelope in inout of ExtractOrder? Also send screenshot with inputs of getContentPart and write file service.

hi,
this is screenshot with inputs of getContentPart and write file service.
I don’t know how to use wm.tn.rec:BizDocEnvelope

In ExtractOrder define document reference and refer BizDocEnvelope document found in WmTN/wm/tn/rec folder. For inputs of getcontentpart pass this bizdocenvelope to ‘bizdoc variable’. For PartName,you can map it from bizdocenvelope field ‘partName’.

HTH!
Shahed

hi,how to define document reference in extractOrder?,for input of get contentpart I copied the document that is in WmTN / wm / tn / rec and I pasted in input and I have not understood what you have to say partName, I have forgiven "XMLData and I always the same error
NB: attachment

Hi,

can you share your package containing ExtractOrder Service?
I would also suggest you to go through Developer User guide to know more about defining inputs/outputs of a service.

hi,

Here is the file or there is the message posted to the TN and “extractOrder” and I have the following error by running the “extractOrder”

An error occurred invoking the processing service TN:ExtractOrder for this document. The original error was java.lang.NullPointerException
at CCC_Utils.utils.writeFile(utils.java:936)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.wm.app.b2b.server.JavaService.baseInvoke(JavaService.java:294)
at com.wm.app.b2b.server.invoke.InvokeManager.process(InvokeManager.java:554)
at com.wm.app.b2b.server.invoke.StatisticsProcessor.process(StatisticsProcessor.java:44)
at com.wm.app.b2b.server.invoke.ServiceCompletionImpl.process(ServiceCompletionImpl.java:221)
at com.wm.app.b2b.server.invoke.ValidateProcessor.process(ValidateProcessor.java:49)
at com.wm.app.b2b.server.ACLManager.process(ACLManager.java:194)
at com.wm.app.b2b.server.invoke.DispatchProcessor

hi,

I have changed your service. Please check if it works fine now
ndeye_2.zip (37.2 KB)

I execute the file you have changed, when I execute it gives me the following table to fill(see attachement)

Since you have restorepipelinefromfile enabled, you can press ‘OK’ to execute.
Need not fill the data.

when I click “OK” I have the following error, it asks me to fill in the fields:

com.wm.app.b2b.server.ServiceException: [ISC.0049.9005] Input validation for service ‘TN:ExtractOrder’ failed: ‘/bizDoc/InternalID VV-005 [ISC.0082.9034] Field is absent, field must exist’

I have another problem, how to handle file errors that I did send it, for example when the file is not write on the hard disk, a person receives a message indicating the error or if the message is not posted to the TN person receives a message

Hello,

Disable the restorepipelinefromfile step and send the the document to TN. check if the document is submitted sucessfully and extractOrder is executed.

the document is sent to TN but ExtractOrder is executed with the following error:

An error occurred invoking the processing service TN:ExtractOrder for this document. The original error was com.wm.app.b2b.server.ServiceException: [ISC.0049.9005] Input validation for service ‘TN:ExtractOrder’ failed: ‘/bizDoc VV-005 [ISC.0082.9034] Field is absent, field must exist’
at com.wm.app.b2b.server.invoke.ValidateProcessor.validateData(ValidateProcessor.java:98)
at com.wm.app.b2b.server.invoke.ValidateProcessor.process(ValidateProcessor.java:45)
at com.wm.app.b2b.server.ACLManager.process(ACLManager.java:194)
at com.wm.app.b2b.server.invoke.DispatchProcessor.process(DispatchProcessor.java:39)
at com.wm.app.b2b.server.AuditLogManager.process(AuditLogManager.java:384)
at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:486)
at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:359)
at com.wm.app.b2b.server.ServiceManager.invoke(ServiceManager.java:246)
at com.wm.app.b2b.server.ServiceManager.invoke(ServiceManager.java:113)
at com.wm.app.b2b.s