Thousands Workflow Events in Tririga queued up by Data Integrator or Web Services will prevent regular user & system Workflows from executing
Fabio L Pinto 270003DRX7 Visits (8076)
If you have developed an interface submitting thousands of Workflow Events to be executed by your process server, they will likely create a huge queue to be processed leading following required and essential user & system Workflows to get queued up as well, waiting for those Events to be processed. At this point your system will get stuck, with sessions waiting for required Workflows to run.
Ideally you should be submitting such Workflow events in "chunks" or small batches so that system is not impacted with lots of Workflows queued up waiting for processing to finish.
If it is too late and you have submitted those thousands of records already, this may take a consider amount of time to process; hours or even days depending on the quantity, complexity and system resources available.
The current count of Workflow Events can be confirmed by checking "IBM TRIRIGA Admin Console" -> "WorkFlow Events" managed object page. You may have an idea of how much time all those queued up Workflow events and the recently added ones (user & system) will take to process by checking that regularly and taking notes of how many records have been moved out from the queue (number of Events queued up, trend).
For managing this situation properly, review the following actions:
A01) Make sure you do have
A02) Make sure you only have one Workflow agent running with open filter (no filter, no list of users). Having two or more Workflow agents running with no filter criteria will slow down process likely since they might be competing for the same resources and records. See more information on our IBM TRIRIGA Wiki page "Whe
If adjusting your system to those recommendations does not help, you may try the following alternative way for handling this situation.
***NOTE! The following procedure is NOT a supported process. This document is intended to assist clients find a workable solution when they have not followed best practices and the system function properly. The steps below are presented as an option but may present a risk if not executed correctly;
AL01) First, you need to get familiar with how Workflow Events work, so please review our IBM TRIRIGA Wiki page "Wor
AL02) Make sure you do have a good backup of your database in place. It is strongly recommend you try the following steps on a lower environment first (testing, sand-box, development).
AL03) You need to determine the criteria for selecting the Workflow records you are bringing from your Interface, so that you can separate them from the user & system required ones. Once you have this information you are able to proceed;
AL04) Review, adapt, and follow the instructions below:
1) Stop the Workflow agent (IBM TRIRIGA Admin Console -> Agent Manager);
2) Create a table wf_event_backup as the current wf_event table. Truncate the wf_event after that (Make sure you do have a good database backup in place);
drop table wf_event_backup;
4) Insert into wf_event table selecting the workflows for the users that are not involved in your interface process, delete those out of the wf_event_backup table once inserted and processed;
Example given (note, you need to user your criteria here, you need to adapt and replace the where clauses below);
insert into wf_event select * from wf_event_backup where user_id <> [user-id];
... or ...
insert into wf_event select * from wf_event_backup where event_id not like '%Associate%';
5) Once those Workflows above have processed, insert 500 records at a time into the wf_event table, from the wf_event_backup table based on row_number (where row_number < 500). See that now you will be working with the Workflow Events coming from your interface Delete from wf_event_backup where row_number < 500.
Example given (for Oracle):
insert into wf_event select top(500) * from wf_event_backup where event_id like '%Associate%' ;
6) Repeat step 5 above until all of those records have been processed (the ones coming from Interface).