Hi all,
suppose I have the following activities in my process (there can also be other activities in the process but they are irrelevant for the cycle time calculation):
- Send PO
- Change Price, and
- Receive Vendor Confirmation
---------------
In my process, possible process variants are:
1.Send PO --> Change Price --> Send PO --> Receive Vendor Confirmation
or
2. Send PO --> Receive Vendor Confirmation
or (and this is where things get tricky)
3.Send PO --> Change Price --> Send PO --> Change Price --> Send PO --> Send PO --> Receive Vendor Confirmation
---------------
-> My goal is to find an expression that always calculates the cycle time between the FIRST Send PO activity that happens after the LAST Change Price occurred and the FIRST Receive Vendor Confirmation activity.
Now, it is relatively easy to define the second part of the cycle time calculation because I can simply take PU_FIRST for the Vendor Confirmation activity. However, I am unsure how to receive the correct Send PO activity of the cycle time calculation. For process variants 1. and 2. I could easily take a PU_LAST for the Send PO activity, however for the 3. process variant there are two Send PO activities after each other without intermediate price changes. Here, I can not simply take the PU_LAST because this would give me a timestamp of the LAST Send PO activity. I am looking for a statement that also includes process variant 3. to be calculated correctly.
-> I have marked the correct activities (bold) in the three process variants above for which I would like to define a general statement for cycle time calculation.
This is what I have so far:
DAYS_BETWEEN (
PU_LAST (
"EKPO" ,
<%= MEL_timestamp_column %> ,
<%= MEL_activity_column %>
=
'Send Purchase Order'
) ,
PU_FIRST (
"EKPO" ,
<%= MEL_timestamp_column %> ,
<%= MEL_activity_column %>
=
'Receive Vendor Order Confirmation'
)
)
@david.beche12 I would highly appreciate your input here as this use case is business critical at our customer...
Many thanks in advance,
Florian