on 03-27-2014 1:15 PM
Dear Scn users.
I just tried a aggregator pattern of collecting messages based on common Id.And also collecting only messages on count.
Below is my pattern
I am confued like what condition I should give in correlation condition to collect the messages.
I tried by giving condition like this
Class="12"
My requirement is to collect the messages having class 12
And only 3 messages.
How to give condition for correlation and how to increment the count based on this condition
Please help me on this
Thanks & Regards
Raghuram S
SAP PO consultant.
Hello Manish and Siddhant,
I completed the pattern.
I just moved counter and IME out of the loop,Its working Fine.
Thanks a lot for the support.:)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
There are couple of ways of doing it
If you are using 731 SP06 OR higher you can use condtiional start(Both Intermediate and start event share same trigger but intermediate event gets preference). Keep on adding 1 to the counter field which is in the main document. In the correlation condition use expression as class=12.Before intermediate event use a exclusive choice decision box to either go to intermediate msg or invoke the service.
So first time message comes counter will be 1 and the exclusive chice will direct to intermediate msg, second time since the intermediate event is waiting so will get pref, so will get invoked and that can increment till next time when counter =3 which the exclusive choice will direct to service and not intermediate msg any more.
Thanks
Manish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI Sri,
Difficult to say what is happening but one thing is if you have put a conditional start then it will take preference and you will not see a process, so pl make sure your correlation condition is good, time being put your correlation condition in case of intermediate message as false and trigger your process.
Thanks
Hi,
you have to do things
1)Whenever u recieve an item u append a counter(field) by 1, which can be a field in your document or u can append every item to a itemlist.
2)In your correlation condtion put one more condition that counter =3 or size = 3 in addition to class=12.
Thanks
Manish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Manish.
Thanks a lot..
I used 3 data Object.
Count-I intialised this with zero at the start event.
then in the Count event I am just adding it with 1,to increment the count value
Class-am just assigning a value 12 to it.(In Intermediate Step)
ClassNo-Am getting the first value from queue.(In Intermediate Step)
and in the correlation condition of intermediate message I am defining as
Class=ClassNo
When I trigger the message,its always taking second value,I mean if the second value is 12 ,3 messages are appended and sent.
Where I am wrong.
Can you please help me on this..
Thanks.
After initializing the counter, use a mapping activity to increment the counter.
After this, use an exclusive choice to check if the value has reached 3. The branches coming out of the exclusive choice: there will be 2 possibilities. either the counter has reached 3 or it has not. if the counter has not reached 3, then connect the branch out of the exclusive choice back to the incrementing step.
if the value has reaached 3, then give the normal flow. Will look something like this:
The condition evaluation of the exclusive choice will be like this:
I really hope i am making some sense.
/Sid
User | Count |
---|---|
84 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.