I am working on TN user status change using wm.tn.doc:changeStatus. I am able to change the status of the user status but it appears only in the activity log. It doesn’t reflect when I search the transactions ( it still shows the processing rule status )
Here is more info: The processing service is executing properly as expected and we’re ftp’ing a file to trading partner. If successful, we are calling changeStatus to SUCCESS/FAILURE.
But when I search the transactions, it still shows the userStatus as the one which I given in Processing rule but when I open activity log, it shows the correct user status like success/failure.
Has anything changed in 9.7 (or) Am i doing anything wrong.
Hi Kumar, are you by any chance updating the user status via the processing rule? That would be on the processing rule action tab.
Yes. The processing rule is trying to update the user status.
Here is what I am doing:
When the processing rule is invoked, I am changing the status to “INVOKED PROCESSING RULE”. This is in the Action tab, where we can specify change User Status.
Once the processing rule does its job like ftp the file, based on SUCCESS/FAILURE. I am trying to change the userstatus, it does change the user status but its only visible when you go to activity log but not on the main transaction search.
I don’t think you will be able to use the processing rule user status update in conjunction with the wm.tn.doc:changeStatus service as I seem to recall that the processing rule user status will overwrite whatever occurs with wm.tn.doc:changeStatus. You probably need to remove the processing rule status change and just use wm.tn.doc:changeStatus.
Yes I agree with Mary and that is the exact behaviour with changeStatus vs rule status update.
Thanks for your inputs but is there a way where we can overwrite the process rule status? Did anything changed in the higher versions? I have seen few integrations in the past where the userstatus is changed whenever the processing rule is successfully invoked, and again based on the processing rule functions it will update again using changeStatus.
Is this not the behaviour now? I am confused
I have worked in environments from 4.0 to 8.2 and, to my knowledge, the Processing Rule User Status update has always overwritten the status set by changeStatus. We only use the Processing Rule User Status in situations where no service is invoked, for example, to denote that a document is ignored. For those documents on which some action is performed (delivered, converted, etc.), we use the changeStatus at key points in the process such as service x invoked, service x completed successfully, service x completed with error, etc.
Can you please specify the execution type from processing rule. Is that synchronous or asynchronous?
Have you tried to switch PR to asynchronous execution type? There are difference between process completion and specified instructions. I’m usually create asynchronous PR, and final user status is changed from process instead of PR instructions.