Closed MaheshkumarSundaram closed 8 months ago
Done, please check and close Thanks
Hi @ralphhanna,
I have a completed process like below:
I am using bpmn-client
to call start the above completed process again with its starting point from RecoveryStart
.
I suppose enableSavePoints
doesn't need to be true
for startEvent
.
But it results in error. What am I doing wrong?
Please try it with the options {restart:true}
here is the code:
if (this.instance.status==EXECUTION_STATUS.end && restart==false)
this.error('*** ERROR **** can not start a completed process');
@ralphhanna,
Thanks. I tried using the src/scripts/cli.ts
in bpmn-web
by adding restart
option and it did work.
ISSUES:
status
is still at end
and endedAt
has a date. Shouldn't status
be running
& endedAt
be null
when restarted?bpmn-client
as the API needs to be changed accomodate optional params - userName
& options
for startEvent
. The types are not included in it now which gives error when adding the parameters.bpmn-client
updated
Hi @ralphhanna,
Although the workflow has been restarted, the
status
is still atend
andendedAt
has a date. Shouldn't status berunning
&endedAt
benull
when restarted?
Will this be sorted in the next release? Thanks
Yes Sent from my iPhone
On Mar 21, 2024, at 10:37 AM, Maheshkumar Sundaram @.***> wrote:
Hi @ralphhannahttps://github.com/ralphhanna,
Although the workflow has been restarted, the status is still at end and endedAt has a date. Shouldn't status be running & endedAt be null when restarted?
Will this be sorted in the next release? Thanks
— Reply to this email directly, view it on GitHubhttps://github.com/bpmnServer/bpmn-server/issues/179#issuecomment-2012470876, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AC2XVKF7YUWRRFC4GKNMEA3YZLWDJAVCNFSM6AAAAABEUAE5U2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMJSGQ3TAOBXGY. You are receiving this because you were mentioned.Message ID: @.***>
Yes, working on it
Please check new release 2.1.9
I am going ahead and close this one as it is already completed 2.1.9
@ralphhanna,
This issue still seems to persist. I updated both bpmn-web
and bpmn-client
to the new versions.
bpmn-client
's cli.ts
still throws error on startEvent
.
But the cli.ts
under src\scripts\
in bpmn-web
doesn't give any error and it restarts the process.
Although cli.ts
in bpmn-web
restarts the process for startEvent
, the status
of the process is still at end
and endedAt
has a date. I thought you fixed this too.
I have turned off my enableSavePoints
but I suppose this doesn't affect this.
Kindly look into this. Thank you.
Please get latest bpmn-server
Also, the error message is valid, restart is only valid for completed processes.
restart
has indeed been fixed so status is now running. however, startEvent
is rather different and does not impact the status.
@ralphhanna,
bpmn-server
is already updated but the startEvent
from bpmn-client
still gives error.
startEvent is rather different and does not impact the status.
May I ask why? This behaviour is similar to restart
right? It doesn't seem logical if status
and endedAt
aren't updated!!!
startEvent
is intended for a second process to start to an already running instance
Example is 'invoice` below
The second start allows the manager to intervene and cancel an invoice before it is completed or alter the behaviour in any way. https://bpmnserver.github.io/bpmn-server/api/classes/APIEngine/#startevent
While restart
is only used to re-execute an instance from a particular point due to an error, and this requires savePoints
https://bpmnserver.github.io/bpmn-server/api/interfaces/IAPIEngine/#restart
@ralphhanna,
Thanks for the explanation. But could you please clarify the below ambuiguity?
startEvent
is intended for a second process to start to an already running instance
If it's intended to start an already running process, why startEvent
has an option { restart: true }
? Isn't quite ambiguous as it means the instance has already completed and you are meaning to start a completed instance from a different start event?
If { restart: true }
is specified, it would make sense to update status
and endedAt
accordingly, and leave them unchanged if restart
is false
or not specified. Right!!!?
Linking the related discussion here.
What do you think?
@MaheshkumarSundaram You win, my mistake, is fixed in the upcoming release 2.1.12
Hi @ralphhanna,
Please add
api.engine.startEvent
inbpmn-client
and also insrc/scripts/cli.ts
in the webapp. Thanks.