When setting up Policy Orchestrator/Predictive Analytics for use with Applications Manager, not all Jobs might be loaded into the EventBase for further analysis.
If there are jobs with the same start date in the Applications Manager's job history, some of those jobs might be skipped.
Please note: You will need Modelling Studio to implement this resolution.
Create a new dummy EventBase (this is necessary, because a new component is required that is by default only available for Operations Manager EventBases):
- In Configuration Manager, add a new dummy EventBase for an Operations Manager:
- On the Automic System tab, untick the Check Source DB checkbox:
- On the EventBase DB tab, enter valid settings for a database (use a new database that you can remove afterwards or use the same settings as for your Applications Manager EventBase DB).
- Click Next and Apply. In case your Decision Worker is set to start automatically, there will be errors in the Worker log file concerning the dummy EventBase. You can ignore those errors.
- After the changed configuration was successfully applied, you can remove the dummy EventBase again by clicking Back, selecting the dummy EventBase, clicking Remove and OK. Again, click Next and Apply to apply the changed configuration and commit the removal of the dummy EventBase.
- Close Configuration Manager.
- If you created a new database for the dummy EventBase, you can now remove this database again.
Open Modelling Studio and modify the Applications Manager EventBase:
- Open the Applications Manager EventBase
- Add a new Thread Pool.
- In the tree structure of the EventBase Model view, right click the Thread Pools folder, and from the context menu select Add Thread Pool.
- In the Thread Pool Creation Wizard, as display name, use, for example, Filter Duplicate Jobs Thread Pool. Click Next.
- In Step 2 of the wizard, select 1 for both, the Min. Threads and Max. Threads values:
- Click Finish.
- Make sure that you are in the Message Enrichment Map: In the EventBase Model view, double click Message Enrichment Map under the Maps folder.
- Add a new service to the Message Enrichment Map to filter duplicate jobs from the Job History Pull Adapter:
- In the tree structure of Components view, navigate to Automic, ApplicationAssurance, EventServices:
- Drag the Filter Duplicate Events Service template into the Message Enrichment Map. Select a name for the Event Service or keep the suggested one. Click Next.
- In Step 2 of the Event Service Wizard, set the Value of PrimaryKey to @timeCreatedUTC and the Value of SecondaryKey to JobID. Click Next:
- In Step 3, uncheck All as an available input port Event Object Type, and only select Automic, AM, Job. Click Next.
- In Step 4, uncheck All as an available output port Event Object Type, and only select Automic, AM, Job. Click Finish.
- Modify the settings for the new Event Service:
- Double click the newly created Event Service on the Map. In the Properties view, define the parameters for the Event Service.
- Under Settings, Thread Pool, select Filter Duplicate Jobs Thread Pool (i.e. the Thread Pool that you created earlier in Point 2). Under Settings, Processing Mode, select QueuedInOrder:
- Connect the new service between the Adapter and the Message Broker Service:
- Delete the connection from the Job History Pull Adapter to the Message Broker Service.
- Add a connection from the Job History Pull Adapter to the Filter Duplicate Events Service.
- Add a connection from the Filter Duplicate Events Service to the Message Broker Service. Your Map should look like this:
- Edit the SQL query for the Job History Pull Adapter:
- In the tree structure of the EventBase Model view, select the Job History Pull Adapter, located under the Event Adapters folder.
- In the Properties view, select the Parameters property and click on the button with the three dots to open the Parameters Property Editor.
- Modify the Query parameter. In the Value cell, in the SQL query, find the constraint jh.SO_START_DATE > :param and replace it with jh.SO_JOB_FINISHED >= :param (i.e., change the left hand side column name and change the greater than to a greater than or equal), and find the order by statement and change it from order by jh.SO_START_DATE to order by jh.SO_JOB_FINISHED. Click OK.
- Save the EventBase.