Call Script action in Business Rule

ersureshbe
Giga Sage
Giga Sage

Hii All,

I created the script action and tried to call into Business Rule. It doesnt working. The following condition i used.

1. Event has created

find_real_file.png

2. Wrote the script in Script action and mapped with Event.

find_real_file.png

3. Called the script action into Business Rule.

When to Run 

When - After,  Order - 111, Insert and update, Condition - Attachment count changes and Supplier Ref is not empty.

find_real_file.png

 

I tried to execute and it's not working. I have used script from script action in Business Rule -attachment count value is updating. Could you please explain why this issue is happening

Regards,

Suresh Loganathan.

Regards,
Suresh.
3 REPLIES 3

SanjivMeher
Kilo Patron
Kilo Patron

Can you make the business rule async and remove the when from the gs.eventQueueScheduled and change it to gs.everQueue() and try again,


Please mark this response as correct or helpful if it assisted you with your question.

ARG645
Tera Guru

Everything looks good. May be your Business Rules is not firing. Can you put in Log statements in your Business Rule and check if they appear. Also, put log statements in your script action. You scheduled your event to fire after 2 minutes, so check the logs for script action after 2 minutes. 

ersureshbe
Giga Sage
Giga Sage

Issue has been fixed. It was happen due to event name. We should use . symbol when we are giving space in Script Action name. ie., "Test Data" we should name it as "Test.Data"

Regards,
Suresh.