Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

parses out spiffworklow:property tags in bpmn extensions and makes th… #191

Merged
merged 4 commits into from
Jul 22, 2022

Conversation

danfunk
Copy link
Collaborator

@danfunk danfunk commented Jul 13, 2022

…em available as a dictionary on the task spec.

if the xml looks like this:

      <bpmn:extensionElements>
        <spiffworkflow:properties>
          <spiffworkflow:property name="formJsonSchemaFilename" value="my_json_jschema.json" />
          <spiffworkflow:property name="formUiSchemaFilename" value="my_ui_jschema.json" />
        </spiffworkflow:properties>
      </bpmn:extensionElements>

Then the task properties will be accessible here:

task.task_spec.extensions['properties']

…em available as a dictionary on the task spec.

if the xml looks like this:
```xml
      <bpmn:extensionElements>
        <spiffworkflow:properties>
          <spiffworkflow:property name="formJsonSchemaFilename" value="my_json_jschema.json" />
          <spiffworkflow:property name="formUiSchemaFilename" value="my_ui_jschema.json" />
        </spiffworkflow:properties>
      </bpmn:extensionElements>
 ```

 Then the task properties will be accessible here:
 ```python
 task.task_spec.extensions['properties']
 ```
@danfunk danfunk requested review from essweine, burnettk and jasquat July 13, 2022 14:34
@essweine
Copy link
Contributor

I would add a properties attribute to spiff.UserTask and store them there, but I am unlinely to be dealing with a random dictionary of stuff on the frontend, so I don't have a strong opinion about this.

Copy link
Contributor

@burnettk burnettk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tested this in the backend, it didn't immediately work, added a debugger to the parser, it was never getting into your code, and realized we were importing the camunda parser explicitly. so after updating to use the spiff parser and serializer and updating expectations in the code about how the extensions would come out, things are looking good.

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@danfunk danfunk merged commit 266cab3 into main Jul 22, 2022
@danfunk danfunk deleted the feature/spiff_properties branch August 19, 2022 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants