instantiation form data

1
0
-1

is there a way to retrieve the caseId from an instantiation form?

I'm building the following URL:

/portal/resource/process/:processName/:processVersion/content/?id=:processID

with it, I open a browser that shows me the instantiation form for that process. I can complete the form and start a new case.
What I want is to be able to, through a REST GET request in my code, or something like that, be able to retrieve the newly created caseID. Is this even possibel?

2 answers

1
0
-1

It's not totally clear if you want the caseID before or after start the new case:

Before = is there a way to retrieve the caseId from an instantiation form?

I think you're asking can I show the caseID on the Instantiation Form? Is this correct?

After = What I want is to be able to, through a REST GET request in my code, or something like that, be able to retrieve the newly created caseID.

If before then the simple answer is No.

Now for the long explanation, actually not long but just an explanation.

Please also refer to http://documentation.bonitasoft.com/?page=execution-sequence-states-and-... for how it all hangs together.

In brief:
ONLY on submit of the Instantiation Form is the case actually created and therefore you can only get the caseID after it is submitted.

Why is this the case I hear you asking.

The simple reason is I open a form - no it's the wrong one - cancel. etc etc etc across 50 people or 1,000 people it doesn't matter.

If the case was opened before the Instantiation Form was submitted then we would have potentially tens of thousands of opened but invalid cases on the queue. Which is not what we want.

This is how nearly all BPM systems tend to work so as to keep things clean, and boy did it cause me problems at the beginning.

regards
Seán

PS: While you may not like the answer, it gives the correct answer, please mark as resolved.

1
0
-1

If you mean: get the caseID before the form is submitted, then the answer is NO - for the very simple reason that the case is created AFTER submission.

If you mean: get the caseID after submission, then the answer is yes (with some trickery).

1: Define some value that is your own ID for the case - a UUID is good choice.
2: Arrange that the UUID (or other value) appears in the displayName or displayDescription of the first task in the case.
3: Use the API (or SQL) to search for that.

Testing
Notifications