As part of a requirement the clients would want us to create an SPFX webpart which displays all the document names and the tasks or workflows running on it for that user/current User. Is there a way in Client side with which i can get this detail? This has to be all the workflows running for current user. Any help is greatly appreciated!!!!
1 Answer
I'm not sure about Flow, but you can interact with the Workflow Services from the client side. Here are a couple articles covering how to get that set up:
Using the Workflow Services JSOM you can interact with the Deployment Service which you use to get the workflow definitions available on a site, the Subscription Service which you use to figure out which workflows are attached to which lists, and the Instance Service, which you would use to find currently running workflows.
Some of the client side functionality is available through REST endpoints like
/_api/SP.WorkflowServices.WorkflowInstanceService.Current/[method name]
This question has a few links that may be helpful in figuring out what REST endpoints are available, but that being said, I see no reason why you couldn't just make sure SP.WorkflowServices.js
is loaded so that you can use the regular JSOM from your SPFx webpart.
-
thanks for the answer, i will check and see if this helps... Commented Aug 25, 2020 at 7:17