Skip to content

Workflows Component

Used to sync workflows from a source instance to a destination instance of Swimlane

sync_workflow

This methods syncs a single applications workflow from a source Swimlane instance to a destination instance.

If an application_name is in our include or exclude filters we will either ignore or process the workflow updates for that application.

Once an application_name is provided we retrieve the workflow for that application from our workflow_dict. Additionally we retrieve the destination workflow for the provided application.

We create a temporary object that compares the stages of a source workflow to a destination workflow. If they are exactly the same we skip updating the workflow. If they are not, we copy the source workflow to the destination and update it to reflect the new workflow ID.

Finally we update the destination workflow with our changes.

Args: application_name (str): The name of an application to check and update workflow if applicable.


def sync_workflow(self, application_name: str)

sync

This method is used to sync all workflows from a source instance to a destination instance

def sync(self)

Workflow Model

ActionBase (WorkflowBase)

__attrs_init__(self, id, name, disabled, parentId, actionType) special

Method generated by attrs for class ActionBase.

Source code in aqueduct/models/workflow.py
def __attrs_init__(self, id, name, disabled, parentId, actionType):
    self.id = id
    self.name = name
    self.disabled = disabled
    self.parentId = parentId
    self.actionType = actionType

Condition

__attrs_init__(self, conditionType, fieldId, isCaseSensitive, value=None, referenceFieldConjunction=None, referencedApplicationFieldId=None) special

Method generated by attrs for class Condition.

Source code in aqueduct/models/workflow.py
def __attrs_init__(self, conditionType, fieldId, isCaseSensitive, value=attr_dict['value'].default, referenceFieldConjunction=attr_dict['referenceFieldConjunction'].default, referencedApplicationFieldId=attr_dict['referencedApplicationFieldId'].default):
    self.conditionType = conditionType
    self.fieldId = fieldId
    self.isCaseSensitive = isCaseSensitive
    self.value = value
    self.referenceFieldConjunction = referenceFieldConjunction
    self.referencedApplicationFieldId = referencedApplicationFieldId

FieldSetAction (ActionBase)

__attrs_init__(self, id, name, disabled, parentId, actionType, fieldId=None, value=None, dateActionModifier=None, dateActionType=None) special

Method generated by attrs for class FieldSetAction.

Source code in aqueduct/models/workflow.py
def __attrs_init__(self, id, name, disabled, parentId, actionType, fieldId=attr_dict['fieldId'].default, value=attr_dict['value'].default, dateActionModifier=attr_dict['dateActionModifier'].default, dateActionType=attr_dict['dateActionType'].default):
    self.id = id
    self.name = name
    self.disabled = disabled
    self.parentId = parentId
    self.actionType = actionType
    self.fieldId = fieldId
    self.value = value
    self.dateActionModifier = dateActionModifier
    self.dateActionType = dateActionType

FieldStateAction (ActionBase)

__attrs_init__(self, id, name, disabled, parentId, actionType, fieldStates={}) special

Method generated by attrs for class FieldStateAction.

Source code in aqueduct/models/workflow.py
def __attrs_init__(self, id, name, disabled, parentId, actionType, fieldStates=attr_dict['fieldStates'].default):
    self.id = id
    self.name = name
    self.disabled = disabled
    self.parentId = parentId
    self.actionType = actionType
    self.fieldStates = fieldStates

FilterValuesAction (ActionBase)

__attrs_init__(self, id, name, disabled, parentId, actionType, valuesListsIds=[], fieldId=None) special

Method generated by attrs for class FilterValuesAction.

Source code in aqueduct/models/workflow.py
def __attrs_init__(self, id, name, disabled, parentId, actionType, valuesListsIds=attr_dict['valuesListsIds'].default, fieldId=attr_dict['fieldId'].default):
    self.id = id
    self.name = name
    self.disabled = disabled
    self.parentId = parentId
    self.actionType = actionType
    self.valuesListsIds = valuesListsIds
    self.fieldId = fieldId

LayoutAction (ActionBase)

__attrs_init__(self, id, name, disabled, parentId, actionType, layoutActions={}) special

Method generated by attrs for class LayoutAction.

Source code in aqueduct/models/workflow.py
def __attrs_init__(self, id, name, disabled, parentId, actionType, layoutActions=attr_dict['layoutActions'].default):
    self.id = id
    self.name = name
    self.disabled = disabled
    self.parentId = parentId
    self.actionType = actionType
    self.layoutActions = layoutActions

NotificationAction (ActionBase)

__attrs_init__(self, id, name, disabled, parentId, actionType, message=None, recipients=[], subject=None) special

Method generated by attrs for class NotificationAction.

Source code in aqueduct/models/workflow.py
def __attrs_init__(self, id, name, disabled, parentId, actionType, message=attr_dict['message'].default, recipients=attr_dict['recipients'].default, subject=attr_dict['subject'].default):
    self.id = id
    self.name = name
    self.disabled = disabled
    self.parentId = parentId
    self.actionType = actionType
    self.message = message
    self.recipients = recipients
    self.subject = subject

StageCondition (WorkflowBase)

__attrs_init__(self, id, name, disabled, parentId, conditionType, evalType, conditions=[], actions=[], repeats=[], stages=[]) special

Method generated by attrs for class StageCondition.

Source code in aqueduct/models/workflow.py
def __attrs_init__(self, id, name, disabled, parentId, conditionType, evalType, conditions=attr_dict['conditions'].default, actions=attr_dict['actions'].default, repeats=attr_dict['repeats'].default, stages=attr_dict['stages'].default):
    self.id = id
    self.name = name
    self.disabled = disabled
    self.parentId = parentId
    self.conditionType = conditionType
    self.evalType = evalType
    self.conditions = conditions
    self.actions = actions
    self.repeats = repeats
    self.stages = stages
    self.__attrs_post_init__()

TaskAction (ActionBase)

__attrs_init__(self, id, name, disabled, parentId, actionType, autoRun, taskId=None) special

Method generated by attrs for class TaskAction.

Source code in aqueduct/models/workflow.py
def __attrs_init__(self, id, name, disabled, parentId, actionType, autoRun, taskId=attr_dict['taskId'].default):
    self.id = id
    self.name = name
    self.disabled = disabled
    self.parentId = parentId
    self.actionType = actionType
    self.autoRun = autoRun
    self.taskId = taskId

Workflow

__attrs_init__(self, applicationId, permissions, uid, version, id, disabled, stages=[]) special

Method generated by attrs for class Workflow.

Source code in aqueduct/models/workflow.py
def __attrs_init__(self, applicationId, permissions, uid, version, id, disabled, stages=attr_dict['stages'].default):
    self.applicationId = applicationId
    self.permissions = permissions
    self.uid = uid
    self.version = version
    self.id = id
    self.disabled = disabled
    self.stages = stages
    self.__attrs_post_init__()

WorkflowBase

__attrs_init__(self, id, name, disabled, parentId) special

Method generated by attrs for class WorkflowBase.

Source code in aqueduct/models/workflow.py
def __attrs_init__(self, id, name, disabled, parentId):
    self.id = id
    self.name = name
    self.disabled = disabled
    self.parentId = parentId