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

Question

Question

Can workflow interrupt/terminate a user task?

asked on February 14, 2018

We have a process where Workflow starts Forms BPs. Each Forms BP starts with a User Task.

What we need to be able to do is for Workflow to interrupt/terminate these BP instances depending on various events that occur in the repository.

Is there a way to do this easily, or do we have to have WF modify the Forms database?

v10.3

0 0

Answer

SELECTED ANSWER
replied on February 15, 2018

Here is how I ended up doing this.

When the process starts, it assigns the user task and also starts a "listener" workflow in parallel.

The listener workflow uses Wait for Entry Change to monitor a field on the applicant packet folder.

If the packet gets voided, workflow proceeds and sets the Form BP variable "Voided" to Yes, which is then evaluated in the Exclusive Gateway that follows. The gateway then throws a signal event, which is caught by the user task.

This works fine, except there are two things about it that I don't like:

  1. Each Forms instance will need to have a listener workflow, so we could in theory have over a hundred WF instances just waiting on Wait for Entry Change for days/weeks. I'm concerned about the performance implications.
  2. If we terminate a Forms BP instance from Forms, we also need to go into WF instances and find the corresponding WF that is waiting, and terminate it. If we don't, we might end up with orphaned Workflows that are stuck in Waiting status perpetually.

 

Hopefully there will be a way to terminate BP instances from WF directly at some point soon.

0 0
replied on February 16, 2018

To your point, this is why i soemtimes run the service task off a timer in forms which runs the wf to check the document but not wait on the change. It helps to understand the urgency of the notification as in long processes i may only check once a day.

1 0

Replies

replied on February 14, 2018

It looks like the bp_main_instances table contains the status column.

1 is "In Progress", 2 is "Completed" and 3 is "Canceled".

If we manually set an instance's status to 3, will it break anything elsewhere in Forms?

0 0
replied on February 14, 2018

Hi Ege

An option may be to have a Service Task running in forms that is waiting for a response, or running on timer checking for the response. Based on business process variable passed back to the Form BP this could trigger an event that would terminate the task.

 

0 0
replied on February 14, 2018

Okay, I figured out a way to do this fairly cleanly. This is the request sent from the browser when you manually stop an instance:

I think I can emulate this in Workflow. Still not ideal but better than nothing.smiley

0 0
replied on February 14, 2018 Show version history

Well, never mind. I forgot I would have to authenticate, and I can't emulate authentication with Workflow using LFDS, as the mechanism is just super messy and complex now (compared to previously, which was just a simple POST request using the credentials and getting the cookie) and seemingly requires JavaScript. frown

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

Sign in to reply to this post.