JavaScript Viewer - how to define the fields the wmJobTask brings back

2786
1
Jump to solution
04-02-2015 11:16 AM
AlisonGaiser1
Occasional Contributor

We are using the lastest version of the Workflow Manager JavaScript viewer with our recently migrated 10.2.2 WMX database.

Unfortunately, we have noticed that the order of the fields presented in the table at the bottom are not lining up with the with the results set.

As you can see in this picture, the Assigned To field is showing the Job Name field.

I then noticed that the Job_Name field was toggled off in the viewer.

When I toggle this on, nothing happens. If I proceed to toggle off the Assigned To field, I see the field disappear from the viewer.

We think that the root of the problem is caused by the fact that when our app performs its wmJobTask.searchJobs task (WorkflowManager.js, line 938), the server returns 6 Field Names, the first two of which are the same “"WMX.JTX_JOBS.JOB_ID"“ field, for some reason. I can see the same thing if I query the end point of the service.

The duplication is what throws off the whole grid, it seems.

My question is how we define the fields that the wmJobTask brings back from the server; It seems like these are set server-side. Or could there be something wrong with our database after our upgrade?

Thanks,

     Alison

0 Kudos
1 Solution

Accepted Solutions
AlisonGaiser1
Occasional Contributor

We found that the All Open Jobs general query was returning the Job ID twice. So in order to fix this I went into Workflow Manager Administrator and modified the SQL Query behind the All open jobs query. What I did was remove the WMX.JTX_JOBS.JOB_ID from the select query. Now the correct fields seem to be populating the correct locations in the table.  See below for my final syntax.

Alison

View solution in original post

1 Reply
AlisonGaiser1
Occasional Contributor

We found that the All Open Jobs general query was returning the Job ID twice. So in order to fix this I went into Workflow Manager Administrator and modified the SQL Query behind the All open jobs query. What I did was remove the WMX.JTX_JOBS.JOB_ID from the select query. Now the correct fields seem to be populating the correct locations in the table.  See below for my final syntax.

Alison