hi All,
Facing an issue with the Task API method calls. Could you please have a look at it?
Issue:
Trying to copy Task data from Task#1 to Task#2 immediately after an updation to Task #1.
pseudo code as follows:
Step 1: call applyChanges() method of MWS Task API for Task#1.
Step 2: call getTask() method of wmTaskClient API to get Task #1 details.
Step 3: call updateTask() method for Task#2 by giving the result of getTask() operation of Task#1.
Result: The task data modifications which I did by calling applyChanges() method is not reflected in Task#2.
But Task#1 has the updated details.
Environment details: webMethods 7.1.2, Clustered (2 MWS nodes are present in cluster, these 2 nodes are controlled by 1 load balancer)
I am trying to find the root cause of this problem. Can any one of the below hypothesis be true?
Hypothesis #1: applyChanges() method has an asynchronous behavior.
Analysis: Because of this, even before Task#1 changes are updated to MWS task database, control came to Step 2 and took the old details of Task#1 from database and gave it to updateTask method which is present in Step 3.
Hypothesis #2: applyChanges() and updateTask() methods have asynchronous behavior.
Analysis: Because of this, eventhough applyChanges() method is called ahead of updateTask() method, due to the asynchronous functionality of these two methods, updateTask() method executed first.
Hypothesis #3: applyChanges() and updateTask() methods have synchronous behavior but there is a delay(may be in milli sec.s) in the details propegation between the clustered nodes.
Analysis: applyChanges() method is called first and it copied the details to cluster node 1. Before the details gets copied to cluster node2, getTask operation is getting the task from node2 which does not has updated details.
Can any of these hypothesis be correct? If not, could you please let me know what could be the reason?
And what could be the work around for this issue?
Kind regards,
Raja sekhar Kintali