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

Question

Question

Forms-Gateway Activity Suspends "Object reference not set to an instance of an object" then terminates

asked on June 16, 2022

Hello,

Customer has a form with two parallel Gateways.

When the Form is run the 1st Parallel Gateways activity completes, but the second always suspends with the following error:

Caught exception: Laserfiche.Forms.CommonUtils.Exceptions.LFFormsException
Message: An unexpected error has occurred. [LFF502-UnexpectedError]

Inner exception: System.NullReferenceException
Message: Object reference not set to an instance of an object.

Then two seconds later, it Terminates and shows the following error:

Message: This task was canceled. [LFF340-TaskAlreadyCanceled]

The gateway that is terminating doesn't have any conditions on it.

Not sure why this is happening.

Appreciate the feedback,

Jeff Curtis

 

0 0

Replies

replied on June 16, 2022

By any chance are you trying to merge paths and split paths on the same Gateway activity?

0 0
replied on June 17, 2022

Hello Matthew,

Thanks for the reply.

No, we are not trying to merge and split paths on the same gateway.

Jeff Curtis

1 0
replied on June 17, 2022

Okay, one possible issue down.

I can't tell from your screenshot entirely what is going on.  Can you share a larger view of your process - indicating which gateway is working and which one is failing?

Thanks!

0 0
replied on June 17, 2022

Hello Matthew,

Hope this is better :)

Jeff

0 0
replied on June 17, 2022

So it's on the merge that it is failing, and it's talking about the task being cancelled.

I know there was an issue similar to this on version 10.2, but I believe that was with inclusive gateways, not parallel gateways - and by your tag it looks like they're working with version 11, so that probably isn't the issue.

Would they be willing to share a screenshot of the process history between the gateway that splits the paths and the one that merges them and suspends?

0 0
replied on June 17, 2022

Hello Matthew,

Attached is the Instance History. I removed all of the account assignment information. The task are assigned to a Domain LF Account used to test their Forms:

Thanks,

Jeff

0 0
replied on June 17, 2022

Nothing there is obviously an issue. 

Darn.  I'm running out of ideas. sad

Based on this screenshot, I'm wondering if it's one particular task that it is terminating after.  Your screenshot only includes the start time of the user tasks, not the end time, so I don't know which task ended at 11:26:19 AM, but whichever one did is the one that appears to have led into the path that terminated.  I'm wondering if the other instances of the process terminated from the same path every time.  If so, then perhaps deleting the path between that task and the gateway, saving the process, and then recreating the path would be worth trying.  For that matter, you could delete all the paths into and out of that gateway, save changes, and then recreate them, just to be sure they are "clean".  You could also check out that particular form to see if there are possibly issues with validation or variables missing a name, etc.

1 0
replied on June 17, 2022

Hey Matthew,

Thanks for the information.

I am going to pass along your suggestion to the Consultant who is working with the customer on this Form.

Jeff Curtis

1 0
replied on June 19, 2022

Hi Jeff,

Could you please share detailed error of LFF502-UnexpectedError? Is it an intermittent issue or happen to all instances?

0 0
replied on June 20, 2022

Hello Ziyan,

Below is the detailed error message:

Stack Trace:

Caught exception: Laserfiche.Forms.CommonUtils.Exceptions.LFFormsException

Message: An unexpected error has occurred. [LFF502-UnexpectedError]

Inner exception: System.NullReferenceException

Message: Object reference not set to an instance of an object.

   at Laserfiche.Forms.EntityModels.cf_bp_worker_instances.CompleteHistoryForRetry(String comment, cf_user_snapshot user, cf_bp_worker_instnc_to_resume wr, Boolean isUserTask)

   at Laserfiche.Forms.Routing.FlowObject.UpdateWorkerInstanceForRetry(Int32 processWorkerInstanceId, String comment, IRoutingContext routingContext)

   at Laserfiche.Forms.Routing.RoutingDispatcher.PrepareForRetryStep(KeyValuePair`2 currentStep, Exception& executionException, String comment

Our Consultant relayed the following to me, regarding this Gateway issue:

"It isn’t one particular of the three tasks, I’ve done them in different orders each time. I tried deleting and recreating the paths of all three at once and ran through the process again – it suspended in the same way. I also tried recreating the path away from Parallel Gateway (3) and it suspended the same way."

"Note that the process doesn’t terminate unless you retry one of the suspended Gateways. I haven’t retried anything on the tests I just ran, so they are all sitting Suspended"

Appreciate the feedback,

Jeff Curtis

0 0
replied on June 20, 2022

Thanks for sharing the details. 

So there seems actually 2 issues:

  1. 'Parallel Gateway (3)' are suspended at first execution
  2. Retry suspended 'Parallel Gateway (3)' terminates the instance

 

The UnexpectedError is from retrying the suspended gateway (function PrepareForRetryStep). Is there error logs at first gateway execution? This may let us know what went wrong at the beginning.

I also suggest recreate the gateway not just the sequence flows to give it a try. 

 

If customer would like to resume terminated instances, please open up a support ticket and provide the business process for further investigation. 

1 0
replied on June 22, 2022

Hello Ziyan,

The 1st Parallel Gateway always completes in less then a minute (Example below):

This Gateway then flows to Three Different User Tasks based on the decision taken.

Appreciate the feedback,

Jeff Curtis

0 0
replied on July 11, 2022

Hello Ziyan,

Checking back on this to see if you have any ideas.

Thanks,

Jeff

0 0
replied on July 11, 2022

Hi Jeff,

My apologies for missing the reply. 

 

As for error log of 'first gateway execution', I was actually referring the first execution of 'Parallel Gateway (3)' not 'Parallel Gateway (2)'. Is there any error before attached one about the 'Parallel Gateway (3)'?

The attached one seems like logged when retry the gateway according to the stack trace, which is later and not providing clue about why it was suspended at first place.

 

Thanks,

Ziyan

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

Sign in to reply to this post.