Can you please share the information about how the TN is changing the processing status of document? From where the TN processing status service is invoked? I dont see anywhere we defined in a service to change the processing status. But the status of a message is being changed automaically to DONE or DONE W/ ERROR, or etc.
How this is an automatic? What I am assuming is that the system status is changing form the Build in service like "tn.resubmit, rn.submit,…'. Can someone correct me?
There are two types of status in TN one is Processing Status and other one is User Status.
Processing Status will be handled internally based on the output of the transaction. (Success/Failure)
User Status can be set at design time in Processing Rules.
Processing Status will be handled internally based on the output of the transaction. (Success/Failure/un-recognized/unknown) by TN out-of-box functionality (check TN documentation pdf for more info)
TN Transactions…User Status can be set at design time in Processing Rules and also by using (WmTN) wm.tn.doc:changeStatus service in the flow.
Hi,
You will use service like wm.tn.doc.xml:routeXml to send data to TN that will return bizdoc as one of the output. You have to use bizdoc spec (wm.tn.rec:BizDocEnvelope) to update user status.
Thank you for your response.
The thing is, the reason why I want to update this user status because I would like to use that as a checking in my processing rule in TN to know which service to invoke. On my case, I am creating EDIFACT and want to send to TN with user status “completed” before sending to TN. I am using wm.tn.doc.xml:routeXml to send data to TN. Do i need to add the wm.tn.rec:BizDocEnvelope before this step? or I need to add it inside the routeXml service to “ServiceOut”?
As Senthil mentioned you will need to have bizdoc (of the transaction) in the pipeline that you wanted to changeStatus… You cannot do preprocessing unless the particular TN transaction persisted already and wanted to changeStatus for that record/s.
You can also use doc:view (providing required I/p params) service to retrieve the bizdoc (already persisted) in the pipeline and call the changeStatus (to Completed)