on 2019 Nov 13 8:07 PM
Hello Experts,
An automated activity with Synchronous wherein the records from Source needs to be grouped with '7' records in the Target and then sequentially pass to the to Next automated activity as an Input.
Example:
from Source, 'basepersons' occurs multiple times(0...unbounded) say 28 records and in Target it should group and sent Only 7 records each and pass to the next automated activity. Process continues to increment the loop count(7 records X 4 messages triggered) Appropriately. if there 29 records then 5th message should hold one record.
Please suggest your Valuable Inputs. Advance Thanks!
Good Regards- Rajesh PS
Request clarification before answering.
Not sure but:
1. Initialize a variable say i
2. Loop activity -> iteration and collect/append target structure as required
3. At each iteration incement value of i by 1.
4. if i mod 7 = 0 or i = count then send message else collect msg
5. At i = count, exit loop
I just put this immediately, so just check and improvise on logic. Don't run into infinite loop so put appropriate checks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks much for your reply Ravi.
I get it and I'm using a attribute "batchNum"(says 7records is bacthNum is 1 and next next 7 records its 2) and "batchTotalCount" (gives no of messages)from PI to BPM. Based on this can we do the looping and filtering.
for example:
'1' is mapped to DO_Count
for getting the batched records : get(filter(MT_object/result/baseperson, "batchNum=DO_Count")) and this is mapped to Increment mapping.
for Looping(increment): DO_Count+1 and mapped to uncontrolled merge.
Let me know if there is any oversight. and also other better suggestions are most Welcome.
stephen xueThanks - Rajesh PS
Hi Rajesh,
Yes I was suggesting create files with 7 records using multimapping in SAP PI...
and use NWBPM for merging small pack file like 2 records, 3 records... use merger to create new files....You can use counter as artifact in NWBPM for knowing no. of records in incoming files...
Or
PI --> NWPMB --> use counter to read no of records --> Msg Mapping --> Split messages here --> If count of records = 7 -> End process (--> PI --> Target) ; If count of records < 7 use collect and then end this branch (--> PI --> Target)
- Rashmi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rajesh,
I guess you need to use conditional start here, if records are 7 then process records further else use aggregation to hold messages from sources... may be splitting messages to 7 records n then passing to nwbpm help....
- Rashmi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rashmi Joshi ,
Thanks much for your reply.
You meant splitting the messages appropriately in SAP PI itself and then pass to NW BPM? Then how about loop count and total count?
Record_count is static value i.e. 7 always so in a message it should hold only 7 records.
User | Count |
---|---|
72 | |
30 | |
8 | |
7 | |
6 | |
6 | |
6 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.