Module: usertask-helper

Methods

(static) getUpdatedTaskConstraintMapping(currentTaskConstraints, userTaskHTML) → {Object}

Compute the task constraint mapping for a UserTask based on the current mapping (if present) and on the given user task html content.

Parameters:
Name Type Description
currentTaskConstraints TaskConstraintMapping

The constraints which are currently applying for the process

userTaskHTML String

The html content of a given user task

Source:
Returns:

The new computed task constraint mapping

Type
Object

(inner) computeHardConstraints(currentHardConstraints, userTaskHTML) → {Array.<Constraint>}

Compute the hard constraint mapping of a UserTask based on the current mapping (if present) and on the given user task html content.

Parameters:
Name Type Description
currentHardConstraints Array.<Constraint>

List of the current hard constraints

userTaskHTML String

The html content of a given user task

Source:
Returns:

The new computed hard constraints

Type
Array.<Constraint>

(inner) constraintsEquals(con1, con2) → {boolean}

Checks if the two given constraints have the name, the condition and all values in common

Parameters:
Name Type Description
con1 Constraint
con2 Constraint
Source:
Returns:

Equality of the two constraints

Type
boolean

(inner) isImageInHtml(html) → {boolean}

Checks if a given html string contains images with a src attribute

Parameters:
Name Type Description
html String
Source:
Returns:

Is true if there are images within

Type
boolean

Type Definitions

Constraint

Type:
  • Object
Properties:
Name Type Description
_type String
_attributes Object
name String
condition String
values Array.<Object>
Properties
Name Type Description
value String
_valueAttributes Object
_valuesAttributes Object
Source:

TaskConstraintMapping

Type:
  • Object
Properties:
Name Type Description
softConstraints Array.<Constraint>

List of soft constraints

hardConstraints Array.<Constraint>

List of hard constraints

Source: