StepWorkflow Sanity

The StepWorkflow package includes a Sanity process. It has a workflow file for configurations

Sanity
<imp:payload xmlns:imp="http://www.informatica.com/schema/ItemMap" contentType="string">
<workflow>
<label>StepWorkflowSanity</label>
<identifier>StepWorkflowSanity</identifier>
<version>1.0</version>
<step>
<id>Sanity</id>
<urn>urn:p360.api.username</urn>
<urn>urn:p360.api.password</urn>
<urn>urn:p360.api.manager</urn>
<urn>urn:p360.api.queue</urn>
<urn>urn:p360.rest.url</urn>
<urn>urn:dq.timeout</urn>
<urn>urn:p360.api.data.quality.queue</urn>
<urn>urn:p360.api.data.quality.response.queue</urn>
<urn>urn:list.get.timeout</urn>
<getField>Article.CurrentStatus</getField>
<updateFieldDescriptor>Article.CurrentStatus</updateFieldDescriptor>
<createTask>true</createTask>
<sendNotification>true</sendNotification>
<emailConfigs>sanity</emailConfigs>
</step>
  </workflow>
</imp:payload>  

It consists of 3 main sections:

  • URN check. It verifies that urn values that are required for StepWorkflow do exist. It does this based on the values in the config file with the ‘urn’ tag. Users can add any urn's they want to include them in the sanity. If the urn exists and the test is considered SUCCESS if it does not, it is considered FAILED.

  • Workflow map files. The sanity goes through the StepWorkflow.map file and verifies that it can access each workflow file in this file. It also verifies that the workflow identifier in the map file matches the one in each workflow xml file.

  • Access to P360. The config file has get field and update field descriptor values to verify connection to P360. First, it does a get and verifies the response. Then it uses the same value to do a post. Using the same value makes sure nothing is changed for the sanity test but also verifies the connection.

The sanity test also allows for a task to be created and/or an email sent out. For the task and email, the sanity test is labeled a SUCCESS if no tests fail. Otherwise, it is considered FAILED.

Key

Value

Description

urn

urn:p360.api.queue

These are the urn values that the Sanity will verify that they do exist.

getField

Article.CurrentStatus

This is the field that the sanity will use to verify a get for P360

UpdateFieldDescriptor

Article.CurrentStatus

This is the fields used to verify that a post will work to P360. It must be one of the fields in the Update Descriptor field.

CreateTask

TRUE

This determines whether or not there will be a task for the Sanity results.

sendNotification

TRUE

This determines whether or not there will be an email sent for the Sanity results.

emailConfigs

sanity

The xls file that serves as the template for the email.

Sample email:

SanityResults

SanityResults
<type>
<test>
<name>urn:p360.api.username</name>
<details>RestServiceUser</details>
<results>SUCCESS</results>
</test>
<test>
<name>urn:p360.api.password</name>
<details>######</details>
<results>SUCCESS</results>
</test>
<test>
<name>urn:p360.api.manager</name>
<details>ActiveMQ</details>
<results>SUCCESS</results>
</test>
<test>
<name>urn:This.is.a.test.urn</name>
<details>none</details>
<results>FAILED</results>
</test>
<test>
<name>project:/StepWorkflowExamples/workflow/Example_01.xml</name>
<details>Loaded file</details>
<results>SUCCESS</results>
</test>
<test>
<name>Workflow_01</name>
<details>Workflow id matches map file</details>
<results>SUCCESS</results>
</test>
<test>
<name>project:/StepWorkflowExamples/workflow/Example_02.xml</name>
<details>Loaded file</details>
<results>SUCCESS</results>
</test>
<test>
<name>Workflow_02</name>
<details>Workflow id matches map file</details>
<results>SUCCESS</results>
</test>
<test>
<name>get(Article.CurrentStatus)</name>
<details>0939699831001: 200</details>
<results>SUCCESS</results>
</test>
<test>
<name>update(Article.CurrentStatus)</name>
<details>UPDATED</details>
<results>SUCCESS</results>
</test>
</type>