

def create(self, data, commit_sha, status_url, du_id):
    'Create a new workflow.'
    db_obj = objects.registry.Workflow()
    db_obj.id = str(uuid.uuid4())
    db_obj.user_id = self.context.user
    db_obj.project_id = self.context.tenant
    db_obj.deleted = False
    db_obj.app_id = data['app_id']
    db_obj.source = data['source']
    db_obj.config = data['config']
    db_obj.actions = data['actions']
    now = datetime.datetime.utcnow()
    db_obj.created_at = now
    db_obj.updated_at = now
    app_obj = objects.registry.App.get_by_id(self.context, db_obj.app_id)
    db_obj._update_app_scale_config(app_obj, data)
    (plan, assem) = PlanAssemblyAdapter(self.context, db_obj, app_obj).create_dummies()
    db_obj.assembly = assem.id
    workflow.Workflow.insert(self.context, db_obj)
    self._execute_workflow_actions(db_obj, app_obj, assem, commit_sha=app_obj.source['revision'], du_id=du_id)
    return db_obj

dataset/ETHPy150Open openstack/solum/solum/api/handlers/workflow_handler.py WorkflowHandler.create/VarMisuse@146/205 `self`->`db_obj`