Author |
Message
|
doreen |
Posted: Fri Feb 05, 2010 8:35 am Post subject: DuplicateKeyException correlation sets |
|
|
Newbie
Joined: 05 Feb 2010 Posts: 4
|
I'm working in WID v7 and have a process with 2 Receive activities. Before the second Receive I have a For Each to extract a list of transactions to send out in a ProcessTransaction Invoke. Each transaction will then come back into the process in the second Receive activity. I need to initiate the correlation set prior to the second Receive and when I try to set the correlation set in the ProcessTransaction invoke, when the second transaction processes through in the For Each I get this error- DuplicateKeyException : the statement was aborted because it would have caused a duplicate key value in a unique or primary key constraint or unique index identified by 'SQL091129154418430' defined on 'CORRELATION_SET_INSTANCE_B_T'. I have snippets before the ProcessTransaction invoke to see what is coming in and the correlation property I"m using has a different value. any help would be appreciated. thanks. |
|
Back to top |
|
|
jmac |
Posted: Fri Feb 05, 2010 5:10 pm Post subject: |
|
|
Jedi Knight
Joined: 27 Jun 2001 Posts: 3081 Location: EmeriCon, LLC
|
Doreen:
1. I moved your question to the Workflow Engines forum.
2. I need a bit more information. Is this receive by chance in the For Each?
If it is then that is your problem, if not, send me a PI and I will have a look. _________________ John McDonald
RETIRED |
|
Back to top |
|
|
doreen |
Posted: Mon Feb 08, 2010 6:01 am Post subject: |
|
|
Newbie
Joined: 05 Feb 2010 Posts: 4
|
John,
The receive is out of the ForEach, in the ForEach is as Assign, Snippet and Invoke. The Invoke has a one way operation. On the Invoke I am referencing the correlation set with an Initiation of Yes. Where would you like me to send the pi to? Thanks. |
|
Back to top |
|
|
jmac |
Posted: Mon Feb 08, 2010 6:20 am Post subject: |
|
|
Jedi Knight
Joined: 27 Jun 2001 Posts: 3081 Location: EmeriCon, LLC
|
Doreen:
The problem is initializing the correlation set inside the for each, I don't think this is possible. You will need to find another way to do this. Likely you will need to spawn a sub process inside the for each, and have it do the processing you currently have in the for each. You should be able to email me from the link in the reply. _________________ John McDonald
RETIRED |
|
Back to top |
|
|
doreen |
Posted: Mon Feb 08, 2010 6:38 am Post subject: |
|
|
Newbie
Joined: 05 Feb 2010 Posts: 4
|
John,
That's what we figured on Friday that the problem was trying to initiate the correlation set multiple times. We changed it to instead send out the list, instead of trying to send out individual transactions, then the second receive we have in a Repeat Until loop comparing the size of the transactionList to the number that come through. This seems to work OK. |
|
Back to top |
|
|
jmac |
Posted: Mon Feb 08, 2010 6:53 am Post subject: |
|
|
Jedi Knight
Joined: 27 Jun 2001 Posts: 3081 Location: EmeriCon, LLC
|
OK, great, so you are back in business.
Just FYI, I believe there is an open requirement to do something about this Correlation set initiation issue inside a for each _________________ John McDonald
RETIRED |
|
Back to top |
|
|
|