Hello, I have 2 documents are subscribed to one process. Attached the picture. webMethods receive doc1 and invoke srv1; srv1 will generate a file in shared folder and wait a third part software (let’s called it as “Software A”)to process it. After “Software A” finish processing, it will invoke webMethods, and publish doc2, which will trigger srv2. doc1 → srv1 → “Software A” “Software A” → doc2 —> srv2 ----> finish There is no problem to use correlation ID to link them together. My question is what the transition between srv1 and srv2 should be? If there is no any transition, the process will indicate finished after I publish doc1. If I put transition between them, then, in my webMethods, I couldn’t see the process instance was started until I publish doc2. any suggestion about it?
Thanks,
Give a normal transition type from ‘Invoke step1’ → ‘Receive 2’. Make sure that you assign the correlation service at steps ‘Receive 1’ and ‘Receive 2’ as these two are the critical points where a correlations is needed for the two steps of the business process.
See the attached image for clarification. After completion, generate the business process and update for monitoring. Go to WmMonitor page and enable the process.
You are correct, you cannot draw a transition from a receiver or step to another receiver.
But if i am not mistaken what you are looking forward to is a JOIN.
I am trying to handle an inbound PO and post it in SAP.
Wait for the PO confirmation document to be created in SAP and when that is published to the Broker. I have a receive step which will receive that document and process the PO Confirmation to the customer.
Now, when I send a PO in, the model is being triggered fine and sending the PO to SAP fine. When the PO Confirmation comes in (happens maybe in 5 minutes or later too) it is trying to join in the process. There is an error on the IS saying Process that this is trying to join is NOT in a running state.
Is your correlation/Join step are properly configured?? Did you set any timeouts? Also i hope you have did this:
configure the step so that it does not execute until both the transition from the activity and transition from the receive step occurs. To do so, set the Advanced > Joins > Join Type property of the “Process PO Confirmation” to AND. which is right after the receive step.
Is your correlation/Join step are properly configured?? Did you set any timeouts?
A: No I dont have any timeouts
configure the step so that it does not execute until both the transition from the activity and transition from the receive step occurs. To do so, set the Advanced > Joins > Join Type property of the “Process PO Confirmation” to AND. which is right after the receive step.
A: Yes the Join type Property is set to “AND”.
Now, I dont see an error in the IS saying that the “process in NOT in a running state”. In the mywebMethods server log for that Process Instance though, I see the step (right after the receive (PO Confirmation) step), with a status “waiting”. Like it is waiting for the document to come eventhough the PO Confirmation document is already in TN and the Correlation service picked it up.
It could be the correlation service is not properly mapped/joining the correct process instance underlying before it Joining as it waits…Did you debug this piece?? I know you might have tracked this.Just trying here with differrent possibilities
In my correlation service. I get the PO Confirmation document. These are the steps I take.
Map ProcessCorrelationID
Pass the above ID, MappingType=IS and CreateIfMissing=false to the pub.prt.correlate:lookupCorrelation service.
I get a ProcessInstanceID successfully and a success flag of True.
The problem is that the ProcessInstanceID that I am getting from the lookup is not matching the process instance ID what I see on the mywebmetods>monitoring>BusinessProcessInstances.
You are on the right track…But what about mapping the correlation ID(substitution from the PO request) to the process instance ID (pub.prt:ProcessData/ProcessInstanceID) using the “establishCorrelation” service right before you send the PO request document to the backend.
And in return during the PO Confimation receive the ProcessCorrelationID(extract from the incoming PO confirmation document) should match each other to get the correct process instance from the Process Engine db.
The setup you mentioned above is OK. The CorrelationID that was being mapped before was the . I have to construct the exact same match on the POConf side. Which I did. Now i made sure that the ProcessCorrelationIDs before and after match.
Still the same issue. Do you have a number where I can reach you at, if it is Ok with you.
I believe the pub.prt.correlate:lookupCorrelation is not finding no association and it creates new process instance as you have set CreateIfMissing=true.
But unless the lookupcorrelation gives the correct PID it will be in Wait mode only.
Check this out:
You have to use the pub.prt:CorrelationService and based on the inputs you give then the PE passes the data and returns the ProcessCorrelationID output and in the map step set variable ProcessCorrelationID (extract from the substituion document\PurchaseOrder\PONumber) in some service called extractCorrelationIDfromResponse and you don’t have to call lookupcorrelation service.
After you create the correlation service, update the process model to reference the service. You update the receive step (Correlation Service property) that waits for the incoming document. As a result, when the business process executes at run time, the correlation service executes to provide the Process Engine with the correlation ID of the incoming document.
how do i make sure that doc2 is the rigth document for the doc1??
i tried to publish doc2<InstanceID, ID, Name, Address> that containe InstanceID got from receiver 1. On the correlation service that invoke pub.prt.correlate:establishCorrelation, i map doc2/InstanceID to the ProcessInstanceID of the establishCorrelation service in.
But, i got error that indicate that doc2/InstanceID map to ProcessInstanceID is null.
So, how do i make correlation between two document?
and how do i make sure that doc2 is the rigth document for the doc1??