Giter Club home page Giter Club logo

Comments (4)

vtexier avatar vtexier commented on August 12, 2024

I am able to reproduce the problem with this simple code.
The problem is in the Box class. It overrides standard dict methods with dict keys.

from SpiffWorkflow.bpmn.PythonScriptEngineEnvironment import Box

# create a standard dict
d = {"items": [1,2], "toto": 'titi'}
# create a Box dict
b = Box(d)

# iterate items() on standard dict is OK
d.items()
# iterate items()  on Box dict is NOT OK
b.items()

Box is deprecated, but the deprecation message does not mention the new class to use...
Can you tell me what class to use in replacement of Box ?
I want to test this code with the new class replacing Box to see if the problem persist.

from spiff-arena.

jbirddog avatar jbirddog commented on August 12, 2024

Thanks for the update, we have been internally debating on Box for a bit. Hopefully the diff that replaces Box is all red lines. I do appreciate following up on this, will add more points to our discussion.

from spiff-arena.

jbirddog avatar jbirddog commented on August 12, 2024

Also forgot to address the replacement for Box - at least within arena is based on this line - https://github.com/sartography/spiff-arena/blob/main/spiffworkflow-backend/src/spiffworkflow_backend/services/process_instance_processor.py#L264

You'd want to switch it to NonTaskDataBasedScriptEngineEnvironment as the base class, but this hasn't been tested in a while and looks like it may lead to issues based on the comment above.

from spiff-arena.

essweine avatar essweine commented on August 12, 2024

I have opened sartography/SpiffWorkflow#359 in the SpiffWorkflow library to remove Box.

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.