I have a page where I can see the list of processes. However, it suddenly started not displaying the processes even though we did not make any changes related to this model. When I checked the payload of the LIST_DOCUMENTS request, I noticed that “a12wf.workflowsInternalDocumentStatus:(EMPTY OR NON_EMPTY)” was added to the filter. If I remove this filter and make the request with the same payload in Postman, it returns all the processes. Additionally, when I check the response data, each process has the value “a12wf”: {“workflowsInternalDocumentStatus”: “NON_EMPTY”. What could be the reason for not returning any process with “a12wf.workflowsInternalDocumentStatus:(EMPTY OR NON_EMPTY)”, or is it possible to remove this filter from the payload?
Payload
[
{
“jsonrpc”: “2.0”,
“id”: “TaskOverviewDataProvider-2”,
“method”: “LIST_DOCUMENTS”,
“params”: {
“documentModelName”: “WoContractProcess-DM”,
“filter”: {
“filters”: [
“a12wf.workflowsInternalDocumentStatus:(EMPTY OR NON_EMPTY)”
],
“fulltext”: “”,
“lang”: “”
},
“page”: {
“offset”: 0,
“limit”: 10
},
“sort”: ,
“facets”:
}
}
]
Response when request made with an empty filter
[
{
“jsonrpc”: “2.0”,
“id”: “TaskOverviewDataProvider-2”,
“result”: {
“fullSize”: 4,
“page”: {
“offset”: 0,
“limit”: 10
},
“entries”: [
{
“docRef”: “WoContractProcess-DM/288”,
“documentModelName”: “WoContractProcess-DM”,
“document”: {
…
…
…
},
“a12wf”: {
“workflowsInternalDocumentStatus”: “NON_EMPTY”,
“processDefinition”: {
“key”: “WoContractProcess”,
“name”: “WO Contarct Process”
},
“taskDefinition”: {
“key”: “Activity_0araijb”,
“name”: “Validate WO data”,
“formKey”: “WoContractProcess-ConfirmData-FM”
},
“process”: {
“id”: “efd4142a-b9fa-11ee-bd00-00ff1ad1962a”,
“businessKey”: “90e899d8-e7dc-4d83-8524-982c1e8727f4”,
“initiator”: “ceodepl”
},
“task”: {
“id”: “efd43b44-b9fa-11ee-bd00-00ff1ad1962a”,
“creationDate”: “2024-01-23T14:23:11”,
“dueDate”: null,
“assignee”: null
}
}
}
},
Hello @n.garryyev, thanks for your post within A12 discourse! We’ve forwarded your request to our Workflows team.
They will get in touch with you soon, to discuss this bug as they need some more information.
Your discourse team
Moin @n.garryyev,
sorry for the delay in response, this thread got lost under the radar.
Does your issue still persist?
Kind regards,
Jan
Hey @n.garryyev , a few days have passed since your last activity here. Is your issue still valid?
The thread would otherwise be closed in the near future. But for sure you always free to create a new one
Best,
Nico
Hi @n.garryyev
As a modeler working with workflows in the Preview App Control, I can model a list view where I see a list of running processes.
The modeling flow is like setting up any standard list view.
- I create an Overview Model
- Reference my Document Model (with Workflows metadata include)
- Add this to the App Model
There is a bit of magic that then happens where this package of models is recognized as being “Workflows Models”. I believe that this is as a result of the Activity Descriptor
{
"model": "MyWorkflow_DM",
"view": "TaskList"
}
I then only see the running Tasks. Once a task is finished, it is no longer displayed in this list view. If you we to add the same Overview Model to the App Model with a different Activity Descriptor, we see all the Documents. In the Installer Workspaces using the Preview App Control, this Activity Descriptor is normally:
{
"module": "MyWorkflowModule",
"engine": "overview"
}
What’s happening is that the “view”: “TaskList” is activating the Workflows component in the Preview App. This means that from this overview, I can start a new process and open forms in the process. Once the task is finished, Workflows automatically sets:
workflowsInternalDocumentStatus = null
This leads to the behavior that you saw.
Please note, I’m working in the Preview Applicaiton, not in the Project Template.
Moin,
the filter is applied in the workflows TaskOverviewDataProvider, which handles the “TaskList” activity.
You could define another view e.g. “MyTaskList” provide your own TaskOverviewDataProvider and not set the filter. Via the Activity Descriptor you specify the “MyTaskList” similar to what @malcolm-silver-ice has described in his previous answer.