Giter Club home page Giter Club logo

Comments (12)

jasquat avatar jasquat commented on August 12, 2024

Note: the timer has to run at least once for this error to occur.

Looks like the error happens in:

SpiffWorkflow/task.py", line 177, in reset_branch
    self.data = deepcopy(self.parent.data) if data is None else data

The parent is None somehow.

@essweine any ideas what could be causing this? Should migrations even be allowed after the timer has gone off once?

from spiff-arena.

burnettk avatar burnettk commented on August 12, 2024

addressed by #1918

from spiff-arena.

madhurrya avatar madhurrya commented on August 12, 2024

Not sure whether this fix is deployed to timetracker, I am still getting that error.
image

from spiff-arena.

madhurrya avatar madhurrya commented on August 12, 2024

Same happens with the Timer Intermediate catch event with a Cycle value

https://timetracking.spiffworkflow.org/process-models/misc:qa:madhu-testing:timer-intermediate-catch-event

Image

from spiff-arena.

jasquat avatar jasquat commented on August 12, 2024

It looks like this fix wasn't deployed out to any environment.

Running locally I do get the following error though. This happens when attempting to actually run the migration. The check code does seem to allow it to proceed now:

 File "/home/jason/projects/github/sartography/spiff-arena/spiffworkflow-backend/src/spiffworkflow_backend/services/workflow_execution_service.py", line 165, in spiff_run
    spiff_task.run()
  File "/home/jason/.cache/pypoetry/virtualenvs/spiffworkflow-backend-Z2xYSxWs-py3.12/lib/python3.12/site-packages/SpiffWorkflow/task.py", line 360, in run
    self.complete()
  File "/home/jason/.cache/pypoetry/virtualenvs/spiffworkflow-backend-Z2xYSxWs-py3.12/lib/python3.12/site-packages/SpiffWorkflow/task.py", line 376, in complete
    self.task_spec._on_complete(self)
  File "/home/jason/.cache/pypoetry/virtualenvs/spiffworkflow-backend-Z2xYSxWs-py3.12/lib/python3.12/site-packages/SpiffWorkflow/specs/base.py", line 368, in _on_complete
    child.task_spec._update(child)
  File "/home/jason/.cache/pypoetry/virtualenvs/spiffworkflow-backend-Z2xYSxWs-py3.12/lib/python3.12/site-packages/SpiffWorkflow/specs/base.py", line 260, in _update
    if self._update_hook(my_task):
       ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jason/.cache/pypoetry/virtualenvs/spiffworkflow-backend-Z2xYSxWs-py3.12/lib/python3.12/site-packages/SpiffWorkflow/bpmn/specs/mixins/unstructured_join.py", line 36, in _update_hook
    task.cancel()
  File "/home/jason/.cache/pypoetry/virtualenvs/spiffworkflow-backend-Z2xYSxWs-py3.12/lib/python3.12/site-packages/SpiffWorkflow/task.py", line 370, in cancel
    self._drop_children()
  File "/home/jason/.cache/pypoetry/virtualenvs/spiffworkflow-backend-Z2xYSxWs-py3.12/lib/python3.12/site-packages/SpiffWorkflow/task.py", line 285, in _drop_children
    if force or child.has_state(TaskState.NOT_FINISHED_MASK):
                ^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'has_state'

@essweine any thoughts?

from spiff-arena.

madhurrya avatar madhurrya commented on August 12, 2024

@jasquat not sure whether the above fix got deployed or not. I just tried again and this time didn't get the error in migration. But got this error when it tried to run the cycle next time.

https://sample.spiffcrm.com/i/18

image

from spiff-arena.

jasquat avatar jasquat commented on August 12, 2024

@madhurrya this is not fixed yet. We're still looking into what is causing it. I'm pretty sure it's due to the backend not removing the tasks that spiff has removed and they become out of sync.

from spiff-arena.

madhurrya avatar madhurrya commented on August 12, 2024

In this instance I had a one cycle completed the milestones looked like this. - https://sample.spiffcrm.com/i/1031
image

Then I changed the cycle timer values and migrated it. Then in the Milestones tab I see only the first 2 entries. The last 2 are missing. Is that the expected behaviour?
image

Same happened with the Boundary cycle timer migration also.

from spiff-arena.

jasquat avatar jasquat commented on August 12, 2024

I wouldn't expect this to happen. We are not explicitly deleting events and I think only process instances have a CASCADE DELETE to events. Will take a look.

from spiff-arena.

jasquat avatar jasquat commented on August 12, 2024

Oh, the events are not getting deleted however the tasks are. If you notice there are several task_completed events still in the table. Those are the missing events. Their tasks were deleted from the database so the task information cannot be pulled up for the events since the task information comes from the actual tasks.

We could cache the task information on the event so if the task goes away, the info persists or we could delete the events which feels really wrong.

In any case, this is a separate issue that isn't really related to process instance migrations since it should also be affecting reset.

from spiff-arena.

madhurrya avatar madhurrya commented on August 12, 2024

@jasquat I didn't fully understand what you have explained above. What do you mean by tasks are deleted?
If you think this is a separate issue could you please create an issue for that, as I am not very clear to add that issue.

from spiff-arena.

jasquat avatar jasquat commented on August 12, 2024

Sure. #1941

from spiff-arena.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.