Skip to content

Update task status in the workflow instance #95

@joshliberty

Description

@joshliberty

The task executer will emit various events to update task statuses (#47) - the workflow executer needs to pick those up, and update the task information within the workflow instance accordingly.

Please also see these related tickets-they contain information about tasks to be executed when a workflow is updated, but are out of scope for this ticket:

Sequence diagram
Untitled

Acceptance criteria

  1. Given the task executer wants to change the task status, WHEN a task update event is published THEN it is picked up by the workflow executer and updated in MongoDB.
  2. Given a valid task update event WHEN it is processed successfully by the workflow executer THEN the update event is acknowledged and removed from the queue.
  3. Given a valid task update event WHEN an error occurs while processing it THEN the event is not acknowledged so that it is picked up again.
  4. Given an invalid task update event WHEN it is picked up to be processed THEN it is rejected and not requeued.

Event schema

{
    "WorkflowId": string,
    "TaskId": string,
    "ExecutionId": string,
    "CorrelationId": string,
    "Status": string,
    "Reason": string,
    "Message": string,
    "OutputArtifacts": dictionary,   
    "Metadata": dictionary
}

This schema corresponds to the task status object: https://github.com/Project-MONAI/monai-deploy-messaging/blob/release/0.1.0/src/Messaging/Events/TaskUpdateEvent.cs.

Integration tests

  • Instantiate RabbitPublisher to send md.tasks.update events
  • Add new assertion method to Assertion.cs to check that a WFI has been updated or not updated accordingly
  • Implement Tests as a new feature file (coverage to be discussed in seperate session)

Metadata

Metadata

Assignees

No one assigned

    Labels

    coreWorkload Manager Core Service

    Type

    No type

    Projects

    Status

    Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions