Skip to content

Commit

Permalink
Make a few more imports explicit.
Browse files Browse the repository at this point in the history
  • Loading branch information
faassen committed Nov 28, 2017
1 parent ec123c9 commit 17fefab
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion SpiffWorkflow/bpmn/parser/ProcessParser.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

from .ValidationException import ValidationException
from ..specs.BpmnProcessSpec import BpmnProcessSpec
from .util import *
from .util import xpath_eval


class ProcessParser(object):
Expand Down
13 changes: 8 additions & 5 deletions SpiffWorkflow/bpmn/parser/TaskParser.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import traceback
from .ValidationException import ValidationException
from ..specs.BoundaryEvent import _BoundaryEventParent
from .util import *
from .util import xpath_eval, one

LOG = logging.getLogger(__name__)

Expand Down Expand Up @@ -88,7 +88,8 @@ def parse_node(self):
'.//bpmn:sequenceFlow[@sourceRef="%s"]' % self.get_id())
if len(outgoing) > 1 and not self.handles_multiple_outgoing():
raise ValidationException(
'Multiple outgoing flows are not supported for tasks of type', node=self.node, filename=self.process_parser.filename)
'Multiple outgoing flows are not supported for tasks of type', node=self.node,
filename=self.process_parser.filename)
for sequence_flow in outgoing:
target_ref = sequence_flow.get('targetRef')
target_node = one(
Expand All @@ -107,7 +108,7 @@ def parse_node(self):
c, target_node, sequence_flow, sequence_flow.get('id') == default_outgoing)

return parent_task if boundary_event_nodes else self.task
except ValidationException as vx:
except ValidationException:
raise
except Exception as ex:
exc_info = sys.exc_info()
Expand Down Expand Up @@ -137,9 +138,11 @@ def get_id(self):

def create_task(self):
"""
Create an instance of the task appropriately. A subclass can override this method to get extra information from the node.
Create an instance of the task appropriately. A subclass can override
this method to get extra information from the node.
"""
return self.spec_class(self.spec, self.get_task_spec_name(), lane=self.get_lane(), description=self.node.get('name', None))
return self.spec_class(self.spec, self.get_task_spec_name(), lane=self.get_lane(),
description=self.node.get('name', None))

def connect_outgoing(self, outgoing_task, outgoing_task_node, sequence_flow_node, is_default):
"""
Expand Down

0 comments on commit 17fefab

Please sign in to comment.