Skip to main content
Solved

BPA IFS Failure Event - Customize the message from variable


Forum|alt.badge.img+2

I am working with BPA for validation purposes. To show a message I am using the IFS Failure Event (Validation Failure End Event) which is documented here: IFS Failure Event (Validation Failure End Event)

My goal is to display a message from a variable. 

In my BPA I have a script task that sets a message variable like so: 
 

 

I connected it directly to the IFS Failure and set the message to be ${errorMessage}: 
 

When this BPA runs the message never substitutes the variable: 
 

 

Any ideas? 

Best answer by adrianm

@PiItPL and @lstanczyk , I have thought of a solution.

Create a projection configuration for the page and add an action to call ERROR_SYS.APPL_GENERAL.

Call the action passing the custom error message as a parameter using variable substitution.

 

And that works…

 

 

View original

Forum|alt.badge.img+2
  • Do Gooder (Customer)
  • April 19, 2024

Hi Lukasz,

did you find any solution? I have same issue.


adrianm
Do Gooder (Partner)
Forum|alt.badge.img+4
  • Do Gooder (Partner)
  • April 19, 2024

I also found it is not currently possible to use variable substitution in the error messages but if you have a limited number of error messages to display, use an Exclusive Gateway to show the appropriate message. Each IFS Failure Event will have to have fixed text for the relevant error. 

 


Forum|alt.badge.img+2
  • Do Gooder (Customer)
  • April 19, 2024

Hi Adrian,

thank you for the solution, but for me this is a terrible workaround.

I can't imagine creating different error messages when I want to add a workflow input parameter in the error text.

For me, the ability to use a variable as error message text is essential functionality. 


adrianm
Do Gooder (Partner)
Forum|alt.badge.img+4
  • Do Gooder (Partner)
  • April 19, 2024

Hi Piotr,

I totally agree but BPAs are a work in progress for IFS and that is the only method I have found as a workaround. There is also no ability to add record detail to the error message such as an order no to help users but hopefully IFS will add this functionality. Unfortunately it is not mentioned in the release notes for 24R1.

 

 


adrianm
Do Gooder (Partner)
Forum|alt.badge.img+4
  • Do Gooder (Partner)
  • April 19, 2024

@PiItPL and @lstanczyk , I have thought of a solution.

Create a projection configuration for the page and add an action to call ERROR_SYS.APPL_GENERAL.

Call the action passing the custom error message as a parameter using variable substitution.

 

And that works…

 

 


Forum|alt.badge.img+2
  • Do Gooder (Customer)
  • April 19, 2024

@adrianm. many, many thanks for this solution! It works perfect.

Tip for next solution users: To remove dot from beginning of message add colon before message text.


sorry, i am new to workflow. i am unable to find projection task like in the above screenshot. i can only find a task with ‘API Details’ as below, please advise. I get a nasty error trying to deploy. ty for help experts.

 


Forum|alt.badge.img+2
  • Do Gooder (Customer)
  • May 30, 2025

@rkescoupland It's the same. I think IFS changed name of the section.


adrianm
Do Gooder (Partner)
Forum|alt.badge.img+4
  • Do Gooder (Partner)
  • May 30, 2025

@rkescoupland it’s exactly what ​@PiItPL said - IFS relabelled some of the properties and renamed the “IFS API” task/shape from “IFS Projection Delegate” task from IFS 23R2. 


Thank you very much for your answers Pilt & adrian.

The pitfalls of being new to IFS Workflow and reading older threads shows it is quite easy to be misled by something innocent like name changes of labels etc.

OK, so I have configured my Projection Config Action and applied the inline code to my workflow - as described in the steps above.

But when I try to deploy the workflow I get the following message popup (so i will paste the text of the error). So even though I have followed these steps - this is the error at deployment of workflow. I was not getting the error before when deploying the workflow - only now.

 

Workflow validation failed with the following errors:

Service Task Activity_12kr7lx: Has Enrichment Input Parameter ifsBpaEnrichmentRegisteredVariables but not the Enrichment Delegate com.ifsworld.fnd.bpa.process.enrichment.IfsBpaProcessEnrichmentDelegate.

Element Activity_12kr7lx: The Enrichment Input Parameter ifsBpaEnrichmentRegisteredVariables must be a list with at least one element.

Element Activity_12kr7lx: A Projection Delegate must have the internal input variable ifsBpaProjectionETagVariableName.

 

Any help on how to resolve it and what steps I need to take, I do not know what these variables are or mean. :( 

I would be very appreciative of any help as I think the concept of this solution above is brilliant. I am used to applying variables in messages for user feedback in other systems so to me this is a must have - and your solution is a great workaround to make it happen!

TIA again.

 


adrianm
Do Gooder (Partner)
Forum|alt.badge.img+4
  • Do Gooder (Partner)
  • May 30, 2025

Hi ​@rkescoupland 

You have an IFS Process Enrichment task/shape in your workflow with no Registered Variables.

Add some variables or remove the shape if it’s not required.

 

 


Forum|alt.badge.img+2
  • Do Gooder (Customer)
  • May 30, 2025

@rkescoupland  the error is caused by another BPA block. Somewhere in your workflow you have added a process enrichment block without defining any parameter, as mentioned in the error.


adrianm
Do Gooder (Partner)
Forum|alt.badge.img+4
  • Do Gooder (Partner)
  • May 30, 2025

@rkescoupland  BPA development can be picked up from the online IFS document and experience but it’s fairly complex so it may be worth you seeking out IFS Academy or other BPA training to get a good grounding. 


Thank you - i will try this.

When testing i ‘decoupled’ the workflow but left it remaining in the canvass to plug back in later…it sounds like I have found another rookie error by doing this.

Thanks so much. I will see what happens when i change the w/f and update this thread again.

 


Thank you adrian - i have been looking at the resources but it is all very ‘idealistic and very simple validation’ examples.

As ever real world requirements are not really met with rich training material or guides. I am using two CF$ for the validation - that in turn I validate with a read API.

I realise this is simple for seasoned experts such as yourself - but the reality is there is no guide to take me through the steps for my scenario - other than giving it a go and making it up as i go along.

I am formatting the CF input for the read call ...too. So i have been digging around existing workflows - but again - there is not one %example% in IFS for CF$_fields to refer that uses a CF triggered event…

again, appreciate the help and sage advices you have contributed!


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