Jump to content

Task Created


Recommended Posts

I've added a webhook that I'd like to capture when a task is created. But so far have been unable to see any activity in my requestbin.

Attached is my setup screen.

I then go and use the service portal and complete a procurement form with spawns a task for a user and I can then query the tasks for that user and see that there is in deed a task for them. But the request bin remains unmolested. So then I thought maybe it's creating the task in collaboration so chose that as the application and still see nothing.

Screenshot from 2016-09-01 13:51:00.png


 
Link to comment
Share on other sites

@Bob320

Entity webhooks only trigger when an EntityAddRecord API call is triggered, the Task Create API's directly communicate with the database and do not trigger these entity events.

I will raise this with development and see if its possible to trigger the entity webhook when a task is created.

Kind Regards

Trevor Killick

  • Like 1
Link to comment
Share on other sites

You mean if I actually use the api then a webhook is triggered, but if the app adds the task then now webhook is triggered?

My reasoning is that if a task is created for a specific user I can capture it externally. That way I don't have to regularly poll the user by api key to find a new task. Not the end of the world and depending on the regularity of it being triggered it may prove more detrimental than polling anyhow.

Link to comment
Share on other sites

@Bob320

If you were to manually add the task entity with entityAddRecord API not Task Create then it would trigger, the internal workings of the Task Create API would not trigger the webhook.

I have asked our platform team if it can be triggered when Task Create API is triggered. 

Kind Regards

Trevor Killick

Link to comment
Share on other sites

Bob,

This is because the Task Entity is a wrapper around a table that is actually used by task specific API's, @TrevorKillick is correct that calling the taskCreate API will not fire the Entity webhook as we do not use the entity internally.  This has been raised internally, I cannot see any reason why we cannot plug in web hooks around task API's. 

It might be of general interest to understand your use case and what you are trying to achieve if you would care to share that here?

Thanks,

Gerry

Link to comment
Share on other sites

We have a need for authorised members of staff to carry out the authorisation of procurement requests based on the cost code that is entered as a question in a service request work flow. Once the service request is logged in generates a task for a user to accept/reject.

As the authority process is outside Hornbill it would be nice to trigger a notification to the authority service with the details of what needs to be authorised.

When authorisation then happens it uses the api to fire back the response and complete the task.

It's not essential as I can poll the user for tasks, and if a webhook is fired for every task it may generate more traffic than polling.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...