Workflow
How to clear serial clogged workflows?
Query the MongoDB database for the workflow's storeId
by workflow ID.
Example with workflow ID of
5f12855302740ff3c82f
.
> use mdworkflow
> db.app_consumerSequence.find({_id:ObjectId("5f12855302740ff3c82f")})
Execute the clear statement after getting the storeId
corresponding to the workflow.
Example of
32e8d0fdsa32948d449
forstoreId
.
> db.app_consumerSequence.remove({storeId:"32e8d0fdsa32948d449"})
> db.app_consumerActivity.remove({processId:"5f12855302740ff3c82f",storeId:"32e8d0fdsa32948d449"})
How to view workflows executed during a specified time period?
Get the organization ID in advance: [Org Admin] >[Info].
Query in MongoDB
> use mdworkflow
> db.wf_instance.aggregate([{"$match": {"companyId":"xxxxxx","createDate": {"$gt": ISODate("2023-05-06T06:10:00.000Z"),"$lt": ISODate("2023-05-06T06:20:00.000Z")}}},{"$group": {"_id": "$processId","count": {"$sum": 1}}},{"$sort": {"count": -1}}])
- Note that replace
companyId
in the statement with the actual organization ID. - The time in the query condition is in UTC time zone, 06:10:00.000Z corresponds to 14:10:00 in East 8 time zone.
Example of query result:
{ "_id" : "6455b144ab61ff25944abd32", "count" : 5890 }
{ "_id" : "645359f4bf0d053e6dec5f43", "count" : 1618 }
{ "_id" : "6455dc569eb0167f785c0692", "count" : 1514 }
{ "_id" : "6455db87690c6744298e6aa4", "count" : 603 }
{ "_id" : "645359f3bf0d053e6dec5f1b", "count" : 332 }
{ "_id" : "645497ca77b2ac62d41c227a", "count" : 294 }
{ "_id" : "645359f4bf0d053e6dec5f5e", "count" : 113 }
_id
is the workflow IDcount
is the number of executions during the period
Visit the following in your browser: System address/workflowedit/workflow ID, to access the corresponding workflow
Example: https://hap.domain.com/workflowedit/6455b144ab61ff25944abd32
If you are prompted that you do not have permission to access the workflow, you can get the workflow name and the application it belongs to by workflow ID.
How to get the workflow name and the application it belongs to by workflow ID?
Query in MongoDB
> use mdworkflow
> db.wf_process.find({"_id":ObjectId("6455b144ab61ff25944abd32")})
- The output contains the name field, which corresponds to the workflow name.
After you get the workflow name, go to [Org Admin] > [Workflow] to search for the application to which the workflow belongs.