Skip to main content
Question

Workflow to perform checks on customer order release


Forum|alt.badge.img+10
  • Hero (Customer)
  • 59 replies

Hi everyone,

We have a number of PLSQL custom event actions and I’ve been investigating workflows as the route to replace these (see all the other debates about this!).

I have a validation workflow which works as expected when configured for updates on the CustomerOrderHandling projection.  If the user edits an order then the workflow correctly blocks the update.

 I actually want to block a customer order release so I added an event action to the standard IFS ORDER_RELEASED event

This doesn’t seem to be triggered (nothing shows up in the observations) and the background job completes successfully, releasing the order.

How do I configure a workflow to perform checks which might result in the need to block the release of a customer order?

Thanks,

MMck

7 replies

Forum|alt.badge.img+7

If observations are not captured, that usually means workflow is not triggered. Can you try adding a custom event and add the event action and try. Also you can use a projection action to trigger the workflow like this.
 

 


Forum|alt.badge.img+10
  • Author
  • Hero (Customer)
  • 59 replies
  • March 18, 2025

Hi Buddhi

Many thanks for your response and apologies for the delay in acknowledging.

The projection call approach worked, but another entry will have to be added for Quick Order Flow handling as well.  It’s not clear how I can achieve that as there’s no simple call on that projection?

Adding a custom event and using that appears to behave in the same way as using the standard ORDER_RELEASED event.  The workflow doesn’t appear to be triggered and so the release isn’t blocked.

It’s a pity, as a general principle using an event means you can trap all the cases at one point instead of having to identify all the projections where it could happen.

Thanks again,

MMck


Forum|alt.badge.img+7

Custom event not firing is a concern. How is your event action is triggered? Does it involve direct DB update?


Forum|alt.badge.img+10
  • Author
  • Hero (Customer)
  • 59 replies
  • March 19, 2025

The event is configured for CustomerOrder ROWSTATE change

The action is configured for when the rowstate changes from Released to Released

and to run the Validation workflow after.

It didn’t show up in the observations when I released a customer order from the Quick Order Flow and the order successfully released in the background job as normal when it should have been blocked.

Is the issue something to do with the order release itself being in a background job?


Forum|alt.badge.img+7

Yes. Before and After timing doesn’t work with background jobs. Only Asynchronous does. But, validation workflows are designed to be run with “Before” and “After” timing only.


Forum|alt.badge.img+10
  • Author
  • Hero (Customer)
  • 59 replies
  • March 20, 2025

Thank you for confirming that before and after workflows can not be run for background jobs.

Specifically for checks to be made when releasing an order, using the customer order projection is fine, but what is the recommended way to react to the release action from Quick Order Flow?  I can’t see a projection call which is applicable.  Do we have to override the CustomerOrder Set_Released procedure?


Forum|alt.badge.img+7

Unlike Custom events Asynchronous workflows are run in their own thread, so they will not have any control over the transaction of the initiating thread (Quick order flow in your case). One suggestion I can think of is to roll the releases back using workflows. But this will be hard to achieve if the state machine doesn’t allow rolling back to the needed earlier state or there’s a complex rollback process.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings