Case status

There is a service CaseStatusService for managing case statuses.

 Every status is represented in a repository as a node which is associated to the case.

icase:caseStatusAssoc

 Status change

The time of the change is recorded in the icase:caseStatusChangedDateTime property.

The new status is available by icase:caseStatusAssoc assoсiation.

The previous status is available by icase:caseStatusBeforeAssoc association.

How to set a case status from a business process?

In the first place, one should receive the case node from the business processes package:

var children = bpm_package.childAssocs['bpm:packageContains'];
var caseNode = children != null && children.length > 0 ? children[0] : null;

If the case node is successfully received, you can make use of case statuses service:

caseStatusService.setStatus(caseNode, "data-filling");
"data-filling" - is cm:name of the required status.