Skip to Content
0
Jul 24, 2020 at 12:59 AM

SCP Workflow API - filter by custom attribute for multiple workflow definitions

149 Views

Hi,

I have 2 workflows A and B. And in workflow A, I assign a custom attribute EmployeeNo.

I'm using workflow API on Neo to query workflow instances - /v1/workflow-instances

I need to get workflow instances of A and B, with filter custom attribute EmployeeNo which belongs to A, so the complete request would be

/v1/workflow-instances?$top=1&$inlinecount=allpages&definitionId=A,B&attributes.EmployeeNo=123456789

I'm not sure how the API handles the attribute filter.

1. Does it know that EmployeeNo belongs to A, not B?

2. Does it have a same result like 2 separate calls like?

/v1/workflow-instances?$top=1&$inlinecount=allpages&definitionId=A&attributes.EmployeeNo=123456789
/v1/workflow-instances?$top=1&$inlinecount=allpages&definitionId=B

And another thing is should the value of attributes be enclosed by single quote?

Thanks.

Tri