Manual Task lifecycle
WorkFusion platform:
- A user creates a task and starts designing and configuring it. Right after the task has been created and configured, the user saves the task. At this point, the task entities are created in the MySQL database on the side of the WorkFusion application, not being posted to the endpoint.
Entries are created in the Run table with the DRAFT status, Question table, and Campaign table.
A user runs a task, the Run status is changed to PROCESSING:
- A batch process runs and makes a Web Service API call to the selected endpoint (for example, Amazon Mechanical Turk) to post a HIT for the Crowd workers.
- The Adjudication Rule for the HIT determines how many Assignments are posted on mTurk.
- For the standard 2 + 1 Rule, two Assignments are posted initially.
Once HIT is posted to the endpoint, the following happens:
Entries are created in the AwsHIt table with
processingStatusSUBMITTED andEndpoinTaskwith the ASSIGNABLE status.In those tables, each row represents a separate HIT.
The number of HITs is based on the number of records in the input file.
The HitSubmissionDataItem table has actual values from the input file.
A batch process keeps polling mTurk to see if posted assignments are completed.
mTurk only gets back to us when all assignments requested for a particular HIT are completed or disposed.
-- 1) if the disposal of the hit has been failed, the hit can be re-submitted to the endpoint. select id into @hitId from AwsHit where hitId = '28929BAA-3C58-4DE4-9E8D-50CC0C21D5EC'; // REPLACE WITH YOURS update EndpointTask et set et.status='ERROR', et.awsHitId = NULL where et.awsHitId = @hitId; update AwsHit ah set ah.submissionDate = NULL, ah.processingStatus = 'READY_TO_SUBMIT', ah.assignments = 1, ah.processesAttemptCount = 0 where ah.id = @hitId; update StreamDescription sd left join Run r on r.uuid = sd.objectUUID left join AwsHit ah on ah.run_id = r.id set sd.status='OPEN' where ah.id = @hitId;Once all assignments for a HIT are completed by the Crowd, the
processingStatusof the HIT in AwsHIt changes from SUBMITTED to REVIEWABLE. The batch job calls themarkHitAsReviewablestatus updated in the database.At this point, entries are also created in the AwsHitAssignment and AwsHitAssignmentAnswer tables.
Then the Adjudication Rule fires and tries to determine if the answers can be accepted or if additional assignments need to be created.
- If Adjudication is not yet completed (for example, the majority has not been reached or max # of assignments have not been posted), the status in AwsHit remains as REVIEWABLE and additional assignments are sent to mTurk (the HIT is extended).
- If Adjudication is not yet completed, even if assignments have been returned, the results are shown in the snapshot or on the View Results tab of the Task Details page.
- Look at the code in
HitApplicationService.processReviewableHit and RuleExecutor.executeRules.
Once Adjudication is complete for a given record, no further assignments are posted. In the AwsHit table, the
hitStatusfield is changed to DISPOSED andprocessingStatusto DONE.At this point, the user can download the data as an Excel snapshot or view the results on the View Results page.