user_uid -> principal_id
This commit is contained in:
parent
963d60f4e5
commit
77893af6d9
|
@ -122,7 +122,7 @@ def upgrade():
|
|||
)
|
||||
op.create_table('task_event',
|
||||
sa.Column('id', sa.Integer(), nullable=False),
|
||||
sa.Column('user_uid', sa.String(length=50), nullable=False),
|
||||
sa.Column('principal_id', sa.String(length=50), nullable=False),
|
||||
sa.Column('process_instance_id', sa.Integer(), nullable=False),
|
||||
sa.Column('spec_version', sa.String(length=50), nullable=True),
|
||||
sa.Column('action', sa.String(length=50), nullable=True),
|
||||
|
|
|
@ -34,7 +34,7 @@ class TaskEventModel(SpiffworkflowBaseDBModel):
|
|||
|
||||
__tablename__ = "task_event"
|
||||
id = db.Column(db.Integer, primary_key=True)
|
||||
user_uid = db.Column(
|
||||
principal_id = db.Column(
|
||||
db.String(50), nullable=False
|
||||
) # In some cases the unique user id may not exist in the db yet.
|
||||
process_instance_id = db.Column(
|
||||
|
@ -77,7 +77,7 @@ class TaskEvent:
|
|||
"""__init__."""
|
||||
self.id = model.id
|
||||
self.process_instance = process_instance
|
||||
self.user_uid = model.user_uid
|
||||
self.principal_id = model.principal_id
|
||||
self.action = model.action
|
||||
self.task_id = model.task_id
|
||||
self.task_title = model.task_title
|
||||
|
@ -100,7 +100,7 @@ class TaskEventSchema(Schema):
|
|||
model = TaskEvent
|
||||
additional = [
|
||||
"id",
|
||||
"user_uid",
|
||||
"principal_id",
|
||||
"action",
|
||||
"task_id",
|
||||
"task_title",
|
||||
|
|
|
@ -233,12 +233,12 @@ class ProcessInstanceService:
|
|||
return task_type
|
||||
|
||||
@staticmethod
|
||||
def log_task_action(user_uid, processor, spiff_task, action):
|
||||
def log_task_action(principal_id, processor, spiff_task, action):
|
||||
task = ProcessInstanceService.spiff_task_to_api_task(spiff_task)
|
||||
form_data = ProcessInstanceService.extract_form_data(spiff_task.data, spiff_task)
|
||||
task_event = TaskEventModel(
|
||||
# study_id=processor.workflow_model.study_id,
|
||||
user_uid=user_uid,
|
||||
principal_id=principal_id,
|
||||
process_instance_id=processor.process_instance_model.id,
|
||||
# workflow_spec_id=processor.workflow_model.workflow_spec_id,
|
||||
action=action,
|
||||
|
|
Loading…
Reference in New Issue