Developer Guide
Helpful Commands and Queries
37 min
this topic is a compilation of commands and queries that you can utilize with swimlane mongodb swimlane database once you’ve connected to mongodb’s swimlane database, you can use some of the queries listed here the queries are organized in this section by the collections targeted within them be sure to backup your swimlane data before using these commands update , remove , delete , deleteone , deletemany , or drop there is a file size limit of 500mb logs to find diagnostic information for the most recently encountered errors to find diagnostic information for errors not strictly related to task execution to find diagnostic information for errors strictly related to task execution, or for any recently executed tasks to find recent execution history (start time, end time, outcome) to find instances of specific error messages or print statement diagnostic messages to find multiple instances of specific error messages to find log entries using regular expression searching to find all log entries within a certain span of time you can also combine several of the above needs (time span inclusion, specific message exclusion) to extract a large set of json documents to the console records mongodb limits the size of a record to 16mb to inspect an individual swimlane record’s properties and field values (after connecting to the swimlane database) `db records find({trackingfull 'case 6'})` to edit a field value in a swimlane record this requires two commands because every field value is stored in two places within the underlying record and to find all records in given application with a malformation (incorrect null) in a certain field, and repair the affected records to find all parent records in a given application that does not have any children to find records with corrupted field values or other malformation to find distinct values within a collection, e g to get the list of all values for a given record field in a given application to count records by application to unlock all records to determine the count of records that are restricted or not yet restricted to find records with text and/or numeric list fields whose values were improperly created via the restful api to delete a record and its history this should only be used when record deletion through the swimlane ui has failed you can run this command after connecting to the swimlane database next, connect to the swimlanehistory database and run see other swimlanehistory queries below settings to extend password expiration to disable active directory sync reports to detect report filter corruption to inspect report filter corruption to purge report filter corruption hangfire to purge the hangfire job queue tasks to find all e mail ingest tasks of type built in imap import to find all integration tasks that rely on a specific asset to find all e mail ingest tasks relying on the sw\\ microsoft\\ exchange plugin to remove ghost task menu entries (which result from creating a task with the same name as a task that was previously deleted by application deletion) to find all tasks where the script includes the value ‘pendulum’ the next two queries list tasks that ran in the last 90 days for mongodb and with python for a mongodb query for a python script integration states to clear the state store (the data persisted by sw\\ context state ) for a given integration task aspnetusers to disable 2fa for a given user gridfs (fs files and fs chunks) to detect orphaned plugin artifacts (often the result of failed plugin upgrades) to find and/or delete the byte stream for an unnecessary plugin to detect large and/or orphaned files that were added to a swimlane record's attachments fields applications to find all of the fields in a given application of a given type signalrmessages setting a timeout on signalr (web socket) messages mongodb swimlanehistory database the queries in this section are useful after connecting to mongodb’s swimlanehistory database records to retrieve every historic revision of a given record kubernetes to ascertain the mongodb connection string to recover mongodb usernames and/or passwords from secrets python this section provides you with some easy methods to inspect json data returned from callees for a small amount of data, use json dumps in combination with print to inspect the data in the console for a larger json object, write it out to a file and then inspect the text file