⚙ Operations Hub

BLai
Participant

Custom code workflow doesn't behave as same as the test action

Hello team,

 

I am creating a workflow to standardize the State property of contacts. (e.g. Arizona ➡️ AZ) Here's what it looks like:

BLai_0-1660854746289.png

 

 

I set up two list as outcome to track the results.  If the workflow can not update the State (e.g. contact input Ariz instead of Arizona, which is not considered by the code), they will be sent to the Failed list.

 

However, some data meeting the trigger criteria (e.g. a contact having Arizona as State) is not updated and sent to the Failed list too. 

 

Here's what I found for now:

1. The log does show that these data has been through the workflow. They are meeting the trigger criteria.

 

2. They were moved to the list Failed - State Standardization based on the value(Boolean False) returned in the step 2.  However, if I enroll them into the test action of step 2, the returned value is Boolean True which is different from the workflow log.

 

3. I tried to force the Failed List enroll into the workflow, and some of the contacts was updated successfully and sent to the success list.  Therefore, for the same code and same contacts, sometimes they have different result from the workflow.

 

Anything I can do to sort this out? 

0 Upvotes
1 Reply 1
Jnix284
Most Valuable Member | Elite Partner
Most Valuable Member | Elite Partner

Custom code workflow doesn't behave as same as the test action

@BLai Have you tried increasing the delay after the custom code? I'm curious if the 3 minutes is enough time for the server to run the code and identify the change, which might be why you have a discrepancy with testing vs live (1 to many) and also when you force the failed list back through (also fewer). I've always used longer delays post code to err on the safe side, I'm just not sure if there is merit to that logic.


If my reply answered your question please mark it as a solution to make it easier for others to find.



Jennifer Nixon - Delivery Lead at Aptitude 8

connect with Jen on Linkedin