Skip to main content
Nintex Community Menu Bar

Hi,

I would like to know if there’s a way for NAC to call my RESTful services when a user completes a task in NAC? Ideally, I would like NAC to send me some sort of task identifier so I could easily know what task was completed.

 

I couldn’t find anything related in the API documentation at Tasks | Nintex Automation Cloud

 

Eduardo

Hello @EduardoLopez ,

 

have you looked into using the Call a Web Service Action?

You can potentially add that after the task and then use the Task Variables Task Responder and Task Outcome.

 

As for the Task ID, I am not aware of a way to get that once the Task is completed, but you could use something like WORKFLOW_INSTANCE_ID_TASK_NAME perhaps?

 


Hi @Deon ,

 

Yes, however, I would like to get the details of the tasks before its completed.

 

What I’m looking for specifically is to create a custom task dashboard outside of NAC, as the one that comes out of the box from My Nintex is pretty much limited, i.e., I can’t add additional columns that can provide additional context to end users without having them open the task form itself, and since the additional data is not something I could add to the task name since it’s a lot of context data.

 

The ultimate goal is for the end users to be able to filter out their task assignments so they can quickly find what they need to take action on. Some of the end users could potentially have hundreds of tasks assigned.

 

I was thinking on using a TaskID to build the URL to take the end users from the custom task dashboard to the NAC task form. Perhaps I could use the formUrl from the GetTask (https://us.nintex.io/workflows/v2/tasks/{taskId}) method taskAssigments.urls array to accomplish such URL-building request?

 

And because I don’t want to have scheduled job doing pulls of task data (polling), ideally, I was looking for some sort of push method (webhook) to optimize the customization.

 

Eduardo


Ah, I see.

 

In that case you can just pull a list of tasks for the current user using the API.

The List Tasks API method does return the FORM URL so you will be able to allow the user to action the task.

No need to do anything special in the workflow itself then.

You will probably need to pass in at a minimum the assignee, status and from data parameters.

I suggest testing in Postman before you create the code for your custom task list dashboard.

 


Ok, so I was able to use Postman and indeed the formUrl points me to the assigned task URL, good.

 

However, I still have the problem of NAC not being able to let my endpoint know immediately after tasks have been assigned. Think webhook. I take it that isn’t even possible because it is not on API documentation.

 

Given this constrain, perhaps, a viable solution would be right before the task assignment make a call to a web service that could post a message to, say an Azure Queue via an Azure Function; then back on the workflow, the assign task action will wait for completion, meanwhile the message in the queue could be processed, say something like after a minute or so after being posted, and retrieve the list of tasks for the workflow instance. I could then use the task data to update my custom task dashboard. Then after the task is completed, I could make another web service that can update the outcome of the task using the GetTask method. Essentially this strategy could get my custom task dashboard in sync with My Nintex.

 

Does that sound reasonable? what limitations do you see in this approach? For this to work I believe I’ll need to make use of an App Token instead of PAT, correct?

 

Eduardo

 


Hi @EduardoLopez , do you think it will be possible for your task dashboard to just call the NAC API directly in real-time when the user’s open it?

 

That way you don’t need to update an external table as tasks gets assigned and completed and no polling needed.


Actually, that’s a pretty good recommendation, although I was hoping to avoid that approach. Let me provide additional context.

 

I was thinking of using a SharePoint Online custom list as the custom task dashboard. That way I could save some development effort into implementing a grid with filtering, paging, custom views, authentication, authorization, etc. The idea was to have this custom list (custom task dashboard) in the same SPO site that will host the list for the NAC workflow (Start Event > SPO New list item). Do recall that some end users will have hundreds of tasks assigned to them; therefore, page load time of the custom task dashboard is a factor to consider --also knowing that the JSON response size from NAC is limited to 4MB).

 

My resources are limited to only two developers, and the timeline is tight (within a few weeks). That’s why we were looking into using SharePoint features before going all the way custom.

 

Does your question imply that no webhook options are available at this moment from NAC? Do you mind sharing some other strategies we could explore now that you know more about the requirements and, somewhat, our timeline constraints?

 

Eduardo


Hi @EduardoLopez ,

NAC does not have any webhook options as far as i am aware of. It will need to be some built-in mechanism where NAC makes a call to a system and passes in the TASK ID or something and that does not currently exist.

The other problem is that the workflow does not have access the task id, except in the task notification e-mail.

To be honest, I don’t know how one would be able to do it with just a SharePoint List.I almost feel that My Nintex will still be better than anything in SharePoint.

In future however, you will have the ability to build dashboards with a new technology coming soon called Nintex Apps (SKUID), see this post one of my colleagues made: https://www.linkedin.com/feed/update/urn:li:activity:7216464297428668417?updateEntityUrn=urn%3Ali%3Afs_feedUpdate%3A%28V2%2Curn%3Ali%3Aactivity%3A7216464297428668417%29

 


Ok, thank you @Deon. I think we have enough feedback to make some good design decisions. Skuid does sound promising.

 

Eduardo


Reply