You are viewing limited content. For full access, please sign in.

Question

Question

Validating Field Constraints Against a Token Value in Workflow

asked on February 12, 2014

Hello,

 

Given a field with constraint >0 & <=99999999, I need to validate, in a workflow, if an integer token value satisfies that constraint. In doing so ***I do not want to hard code the condition*** (see rationale below); in fact I'm confident the workflow can retrieve the constraint in the LF Database, but what is the mechanism that applies the string >0 & <=99999999 against a token value and return a boolean value?

 

Rationale: I do not want to change the workflow's condition when the field's constraint is changed in the admin console

 

Thanks in advance,

 

Louis-Simon

0 0

Answer

APPROVED ANSWER
replied on February 12, 2014

Workflow does not currently support reading the conditional constraints from LF.

0 0

Replies

replied on February 12, 2014

You could theoretically write a script that would do it. However, you'd need to get the string and then have some kind of parser that would be able to identify each type of constraint and turn it into a mathematical expression or pass the string as a regular expression. You'd be reverse engineering the constraints and it would be pretty convoluted.

 

Hopefully somebody can put that in front of the Workflow team to look at. It would be nice to have some kind of activity that could take the results from a retrieve field values activity and spit back a list of valid/invalid fields. For some people it might be enough to use the constraints on the fields and template themselves. However, we tend to have very relaxed constraints up front and then enforce specific rules by having Workflow analyze the fields according to specific business rules. So, the ability to toggle between field constraints and manual constraints would be great.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.