Task Commands

Make your data beautiful again.

Task Commands

Each fuzzy collection contains an internal collection that stores tasks associated with the collection, the inner collection is also accessible via the command line or the api and it will be named xxxx_TASKS where xxxx is your collection name, it will not be listed by the “db listCollectionNames” command, however it does exist and can be used directly. If you do access the task collection directly then the system cannot be responsible for any data integrity issues that are created as the tasks collection stores internal ID references to the main collection. Instead of directly accessing the tasks collection, you can use these utility commands on the main fuzzy collection. findTasks
usage from API:
  cursor = aCollection.findTasks({...filter...}) 
usage from CLI: 
  db.aCollection.find({...filter...}) 

aCollection is the name of an existing fuzzy collection, filter is a mandatory Document (in java) or json string representation of a json object (in cli). Java will return a DBCursor which is a lazy iterable for the Document object, CLI will return json text to the standard out, this can be redirected to a file using a redirector from the command line, for example

monsterCLI -h localhost -d fuzzyTest -r "db.fuzzyc.findTasks()" | more

resolveTask

Use the resolveTask to deactivate a task and force the system to perform a specific action, such as merge, EID assign, Link or simply Reject the task. The document passed to this method should contain at least one property.
“_action” which tells the DB the intention you have with the task it is defined as an integer and should be used like this:
  • DELETE = -1;
  • MERGE = 3;
  • LINK = 5;
  • EID = 7;
Other values can also be supplied to a action, but would be ignored by resolve task.
usage from API:
  cursor = aCollection.resolveTask({...task data...}) 
usage from CLI: 
  db.aCollection.resolveTask({...task data...}) 
In the event that you wish to update the task with some other values, such as the user who resolved the task and when, you should also supply them in the document passed:
resolveTask({"_id": "113112-1312323-aa2222-123432", "_action": 3,  "Resolved",true,"ResolvedBy", "me", "lastUpdated", "some date"});

updateTask

Use the updateTasks to change the values and type of a task, the mandatory field is _id and it is not possible to create a task through this function
usage from API:
  cursor = aCollection.updateTask({...task data...}) 
usage from CLI: 
  db.aCollection.updateTask({...task data...}) 

aggregateTasks

Use the updateTasks to run a pipeline aggregation against the tasks collection, please see pipeline documention for details on this
Fork me on GitHub