Commit 97d04074 by jasl

bug fix

parent b53cbce5
...@@ -39,7 +39,7 @@ module Workflows ...@@ -39,7 +39,7 @@ module Workflows
def set_form_model def set_form_model
@form = @workflow.form @form = @workflow.form
overrides = @token.place.output_transition.options.field_overrides.map { |o| {o.name => {accessibility: o.accessibility}} }.reduce(&:merge) overrides = @token.place.output_transition.options.field_overrides.map { |o| {o.name => {accessibility: o.accessibility}} }.reduce(&:merge) || {}
@virtual_model = @form.to_virtual_model overrides: overrides @virtual_model = @form.to_virtual_model overrides: overrides
end end
......
...@@ -19,10 +19,11 @@ class Workflow < WorkflowCore::Workflow ...@@ -19,10 +19,11 @@ class Workflow < WorkflowCore::Workflow
c = Bpmn::DefinitionContainer.parse(bpmn_xml) c = Bpmn::DefinitionContainer.parse(bpmn_xml)
return unless c return unless c
tokens.delete_all
instances.delete_all
transitions.destroy_all transitions.destroy_all
places.destroy_all places.destroy_all
instances.destroy_all
tokens.destroy_all
place = create_start_place! type: "Places::StartPlace" place = create_start_place! type: "Places::StartPlace"
node_queue = c.start_event.outgoing_ids node_queue = c.start_event.outgoing_ids
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment