sartography / spiff-arena

SpiffWorkflow is a software development platform for building, running, and monitoring executable diagrams
https://www.spiffworkflow.org/
GNU Lesser General Public License v2.1
75 stars 46 forks source link

Execute Task and Skip task doesn't work for script task/send task/milestones #1927

Open madhurrya opened 4 months ago

madhurrya commented 4 months ago

When I try to run 'Execute Task' and 'Skip task ' options in a script task/send task/milestones while the instance is suspended it gives this error. 'ProcessInstanceCannotBeRunError: Process instance '35' has status 'suspended' and therefore cannot run.'

But it works fine for a Manual task. May be it doesn't work for any non human tasks? I checked only with a script task and send task and milestones.

Update : this doesn't happen in dev.app and dev.mod. Only happens in Time tracker and https://sample.spiffcrm.com/ So not sure whether this is also connected to the migration updates.

Image

Test model: https://sample.spiffcrm.com/process-models/misc:qa:madhu-testing:test-model-1 https://timetracking.spiffworkflow.org/process-models/misc:qa:madhu-testing:test-model-with-milestones https://dev.app.spiff.status.im/process-models/misc:test:madhurya-testing:test-model-with-milestones https://dev.mod.spiff.status.im/process-models/misc:test:madhurya-testing:test-model-with-milestones

jasquat commented 4 months ago

This is related to a new check we added to avoid running do_engine_steps unintentionally on suspended process instances. We'll have to put in an exception for this code path.

jasquat commented 4 months ago

Fixed with https://github.com/sartography/spiff-arena/commit/dfce83c68463da6cb5c41d5c633d09137a789cab. I meant to put that in a branch but it's a pretty small change.

madhurrya commented 4 months ago

@jasquat execute is working, but when I try to do Skip Task it gives this error. image

jasquat commented 4 months ago

@jbirddog @essweine was log_info removed during the other event logging work? It should be an easy fix if so.

essweine commented 4 months ago

I changed the name of the method to collect collect_log_extras, which I thought made more sense. I see you've already figured that out.