Field Required Validator Issues after migration to cloud
Â
While migrating the JSU validator to the cloud environment, you might see these messages:
2022-02-01 13:50:03.532 ERROR YOURPROJECTNAME project-export The workflow: [YOURWorkflow] transition: [YOURTRANSITION] is missing config [contextHandling] for workflow rule validator [FieldsRequiredValidator]. Double-check the workflow rule for missing config values or references.
This error will occur because the field-required validators were created with an older JSU version before version 1.4.10 that did not use these fields. Now, these fields are mandatory and necessary to achieve the migration of these validators.
How to confirm the issue:
Export your workflow and check the XML file; the field ContextHandling and other fields are missing from the validator.
From one of the validators that are causing this issue:
<validators>
<validator name="" type="class">
<arg name="hidFieldsList">resolution@@</arg>
<arg name="class.name">com.googlecode.jsu.workflow.validator.FieldsRequiredValidator</arg>
</validator>
</validators>
Â
From a healthy and working validator after migration:
<validators>
<validator name="" type="class">
<arg name="contextHandling"/>
<arg name="hidFieldsList">attachment@@comment@@</arg>
<arg name="jsuWorkflowParamsVersion-textValue">2.28.1</arg>
<arg name="class.name">com.googlecode.jsu.workflow.validator.FieldsRequiredValidator</arg>
<arg name="customErrorMessage-textValue">Adding these fields is Mandatory! Attachments & Comments.</arg>
<arg name="uuid">05108e3a-06e8-4598-bbf2-ffd22596c1e5</arg>
</validator>
</validator>
Instructions to fix this issue:
Please follow these steps to add the missing information for these validators:
Use the latest JSU and the same CMJ version in server/DC and cloud.
Update your workflow/validators
Choose Projects and select a starred or recent project, or choose View all projects and select a project.
From your project's sidebar, select Project settings > Workflows.
Click the edit pencil to the right of the workflow.
Select the transition where the affected validator is located and click on Validators.
Click the edit pencil to the right of the validator
Scroll down to the bottom of the page and click update.
Click Publish Draft.
Retry the migration.
Â