Toggle menu

Creating Custom Task Workflows

Copy the Boilerplate End Points

The boilerplate form calls a set of end points, which should be copied and renamed to match your new task.

First create a new end point group at goss.CaseManagement.v1.tasks.<taskTypeId>. This taskTypeId will be entered into your workflow model as the the taskId set in the first script task (see the later section).

Find the end points at goss.CaseManagement.v1.tasks.boilerplate.

Boilerplate End Points

Copy all of the end points in this group into your new group.

Boilerplate Bulk Copy End Points

Update the getTaskConfig

Your copy of the getTaskConfig end point needs to be updated with values relevant to your task:

  • taskType - this must match the taskTypeId above
  • taskName - change this to something meaningful for your task
  • titleConf - these titles will appear in the Self Service template when users are claiming tasks

For example:

var response = {
    success: false,
    taskType: "timboilerplate"
};
try {
    var configVars = {    
        "taskConf": {
            "taskName": {
                "en": "Tim's Boilerplate Task",
                "cy": "Tasg Enghraifft"
            }
        },
        "titleConf": {
            "timboilerplate": {
                "en": "{{caseTaskSummary}}",
                "cy": "{{caseTaskSummary}}",
            }
        },
        "formConf": {
            "maxFileCountCitizen": 3,
            "maxFileCountStaff": 10,
            "maxFileSizeCitizen": 3000000,
            "maxFileSizeStaff": 5000000,
            "maxFileTextCitizen": "3MB",
            "maxFileTextStaff": "5MB"
        }
    };
    response.vars = configVars;
    response.success = true;
}

End Points Overview

The end points do the following.

NameDescription
addAttachment

Adds an attachment to a caseTask

  • Adds an update to the case notes about the attachment being added
  • Adds an update to the case task notes about the attachment being added
  • Updates the case task process variable UPLOADS to include the new attachment
  • Registers the attachment to the task in the filestore
endTask

This endpoint is called once a task types workflow has been completed

  • It will send the appropriate messages to a case to inform it whether the task was completed or cancelled
  • It will write an update to the case task notes and to the reporting history
getTaskConfigProvides the task configuration
getTaskDataReturns all of the data relevant to the task which can be used by the task forms. This end point can be edited to retrieve additional data 
performClaimChangeActionsUpdates the case whenever the task is claimed or unclaimed by the task officer
removeAttachment

Remove an attachment from a caseTask

  • Adds an update to the case notes about the attachment being added
  • Adds an update to the case task notes about the attachment being added
  • Updates the case task process variable UPLOADS to remove the attachment
  • Removes the attachment from the task in the filestore
startTask

This endpoint is called as part of the initiation phase of the workflow

  • It retrieves the variables from the case that the task needs
  • It retrieves the configuration for the task
  • It records a note for the task start against the case and the case task
writeToTaskHistoryWrites updates entered by the task officer into both the case task notes child entities and the case note child entity
Last modified on 6 January 2026