Server Error: SPIN/JACKSON-JSON-01005 Unable to create node for object of type 'Undefined’


#1

Hi there,

I have the following Collaboration diagram:

My issue here is that on the completion of the Multi-Instance Subprocess (the bottom Pool which is called by the Parallel Multi-Instance Call Activity), my created (via camForm function) json variable (“selectedProduct”) keeps only the submitted values from the last completed instance.
Does anyone know please how can I update (by appending each time the new submitted values) this json variable each time an instance is completed in the Subprocess ?

Thank you in advance,
Steve


#2

Hi Steve,

Could you please upload your bpmn xml.


Multi instance form variable
#3

Hi @Yana and thanks for your feedback :slightly_smiling_face:

I’m going to upload it here on evening because I haven’t got access on my bpmn file now.

Cheers,
Steve


#4

Hi @steftriant

The documentation for Multi-Instance tasks says the following:

A multi-instance activity ends when all instances are finished.

That means, that all the subprocesses are executed before the process gets to your last task. And the problem you are having is, that every subprocess of your multi-instance writes the output to the same result variable. So this variable gets constantly overwritten and only contains the result of the last iteration.

So you should consider creating an object that holds all the results of the subprocesses.

Here is a good forum post that helped me to improve the usage of my multi-instance tasks:

I suggest you implement it similar to this example and collect the results of your multi-instance-tasks after avery instance on your own.

Regards
Michael


#5

Hi @Yana.

Here, is my bpmn file:
Multi-Instance Call Activity.bpmn (7.3 KB)

Please let me explain the main points :

  1. On the completion of the 1st task in the Main Process (Create a List of Products), a json array variable (“product”) is created via camForm function inside an html form and 6 instances of the task in the Subprocess (Select Products from the List) are created and assigned to 6 users.

  2. On the completion of the task in the Subprocess (“Select Products from the List”), a new json array variable (“selectedProduct”) is created via camForm function inside an other html form.

  3. What I want to achieve here is to append the submitted values to this json variable (“selectedProduct”) each time an instance of the task (“Select Products from the List”) is completed. Now, when I complete the Multi-Instance Subprocess, this json variable (“selectedProduct”) keeps only the submitted values of the last completed instance.

Hope this make sense :slightly_smiling_face:

Thanks a lot,
Steve


#6

Hi @MichiDahm and thanks also for your feedback :slightly_smiling_face:

Ok, I’m going to look through @StephenOTT’s suggested forum post here and I will let you know for any result.

Cheers,
Steve


#7

Hi @Yana, @MichiDahm and to anyone else.

Based on @StephenOTT’s post here (Pattern Review: DMN Looping for Array Input), I tried to overcome the issue of replacement of my result variable (which is a json array) on the completion of each instance but unfortunately without any success :face_with_raised_eyebrow:

I explain here my steps in case anyone could help me:

  1. On the completion of the 1st task form (Create a List of Products), a json array (product) is created.
  2. In the Multi-Instance Call Activity, I’ve set my collection to be an array of usernames and so, each task that gets instantiated, is assigned to each one of those users.
  3. On the completion of each instance of the 2nd task (Select products from the List), a new json array (selectedProduct) is created.
  4. My problem is that when I try to complete the 1st instance of this task, I’m always taking the following server error:
    SPIN/JACKSON-JSON-01005 Unable to create node for object of type 'Undefined’

My bpmn file for anyone interested:
Multi-Instance Call Activity.bpmn (8.1 KB)

Does anyone have any idea on this please?

Thank you,
Steve