Question

Event Passes Incorrect Information to Workflow Action

  • 21 March 2024
  • 4 replies
  • 73 views

Badge +4

Hello,

 

I have an event that is triggered upon the removal or change of a record in the ShopMaterialPurOrd LU. That is the Entity that stores pegging data between shop order material lines and purchase order lines.

 

 

The idea behind this customization is to print a shop order pick list to the appropriate printer when material pegged to a shop order is received in on the Register Arrivals page. Receiving the pegged material reserves it to the shop order and removes the record (or changes the pegged qty field) in the SHOP_MATERIAL_PUR_ORDER view, which triggers the event. The workflow works great for receipt of a single line. When two or more arrival lines are received, the event is triggered the appropriate number of times, but it only passes the information from the first trigger for every following trigger. This can’t be intended behavior; is it a bug? Is it a limitation? Is there a workaround that doesn’t involve trying to find a different trigger?

 

 

Any and all help would be greatly appreciated.

 

Thanks,

Dylan


4 replies

Userlevel 7
Badge +20

Hi @dritter 

I also observed the similar thing. Not sure if it’s a bug or the intended functionality, How I interpret the workflow payload is that the attributes with PascalCase are from projection call which is done from the client and the attributes with ALL_CAPS are from the event action (Correct me if I’m wrong)

Try enabling the sourceref attributes in the event and see if you get the correct values.

Otherwise you should have the rowkey of the record in the payload, and using that you can do a projection call to get the correct values.

 

Hope it helps!

Damith

Userlevel 6
Badge +10

Hi @dritter, we currently have a custom event that does this now, but as we are moving to cloud soon I am super interested in this workflow. I’d love to hear how it ends up, and if you are willing to share the bpmn file that would be amazing. If i can assist in the development or testing please let me know. David.

Userlevel 3
Badge +5

Hi @dritter 

To get the correct value from the event action to the workflow as input you must enable the sourceref attributes in the event action.

What is the IFS version you are in? 

There was an issue with event action trigged like this could pass the information from the first trigger for every following trigger. But it was fixed in the following releases 22R1 SU22, 22R2 SU15, 23R1 SU8, 23R2 SU1.

Badge +4

Hi @dritter 

I also observed the similar thing. Not sure if it’s a bug or the intended functionality, How I interpret the workflow payload is that the attributes with PascalCase are from projection call which is done from the client and the attributes with ALL_CAPS are from the event action (Correct me if I’m wrong)

Try enabling the sourceref attributes in the event and see if you get the correct values.

Otherwise you should have the rowkey of the record in the payload, and using that you can do a projection call to get the correct values.

 

Hope it helps!

Damith

Hi @dsj,

 

Thanks for your reply. I have all the relevant attributes selected in the custom event. The ROWKEY is available in the input values, but for both records it is the same.

 

 

Hi @dritter, we currently have a custom event that does this now, but as we are moving to cloud soon I am super interested in this workflow. I’d love to hear how it ends up, and if you are willing to share the bpmn file that would be amazing. If i can assist in the development or testing please let me know. David.

 

Hi @david.harmer,

 

This is what the current version looks like. Once I test and make sure the printer selection is working properly, I will attach the bpmn file. The first node to convert SNAKE_CASE to PascalCase is probably not necessary if the rest of the workflow was developed using SNAKE_CASE variables, but I went through a few different triggers when testing and found that it’s easiest to develop everything using one case type and just convert the input to that type when necessary.

 

 

 

Hi @dritter 

To get the correct value from the event action to the workflow as input you must enable the sourceref attributes in the event action.

What is the IFS version you are in? 

There was an issue with event action trigged like this could pass the information from the first trigger for every following trigger. But it was fixed in the following releases 22R1 SU22, 22R2 SU15, 23R1 SU8, 23R2 SU1.

Hi @kamnlk,

 

Thanks for this! We are on 22.2.12 right now and are updating to 23.1.6 this weekend. If all goes well, we will update to 23.1.8 and circle back to this issue. If the issue is resolved in that update, I will mark this as the accepted answer. Thanks!

 

Dylan

 

Reply