You are viewing limited content. For full access, please sign in.

Question

Question

API or ways to interrupt a user task in Forms from another system

asked on June 12, 2024 Show version history

Hi, does anyone know of a way of interrupting a user task in Laserfiche Forms, not through a timer or signal catch event, but to allow another external system to interrupt the task real-time, i.e. through API call some other methods?

 

We have a requirement from a customer on this, we have thought of using the timer event to interrupt the user task, invoke a workflow to check whether it should be routed back to the original user task or to a different branch, but this will introduce delay and massive amount of logging in monitor causing Forms to slow down when loading monitor.

 

Thanks

0 0

Replies

replied on June 12, 2024

Unfortunately I do believe there is any way to do something like this directly.

But here’s an idea…  I have a process that needs to wait for a database change that could be anywhere from a few hours to several weeks after the user task starts.  I have it running a non-interrupting timer every 24 hours that calls a Workflow (so it’s limited to one extra path in the Form monitor per day).  The workflow runs a loop and checks for the database change every fifteen minutes (so the extra logging is in workflow not the Form) - no changes means keep looping (maxing out just under 24 hours) - if it is changed, end the loop and push a value back into a Form field - if it never changed, the loop ending just under 24 hours ends the workflow without pushing the value back to Forms.  So the workflow either ends with a field value being populated when the database changed or just before 24 hours with no field value.  After the workflow, a gateway checks for the field value, if it is not there, that path just ends (to be started again with the next timer event).  But if the value is there, it throws a signal, which in turn is set to interrupt the user task.  It’s a little complicated, and kind of annoying to have these workflows just in an ongoing waiting status - but it met the need and I only ever have about a dozen of these running each month.

0 0
replied on June 13, 2024

Ideally your form is interacting with a document or folder in the repository that you could use as a 'backend' source for this. You could use a parallel branch to kick off (1) a workflow, and (2) the user task in question. 

The workflow would contain a wait for entry change that waits for a status metadata field to change to 'complete' or something like that. When the workflow completes it would trigger the interrupt event in forms and complete the user task automatically.

Since you mentioned APIs I would use the LF REST API to interact with this entry in the repository and set the field accordingly. The trick is to use a shared id between the 3rd party service and LF so you can identify the entry needed quickly and accurately.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.