How to set a form attribute from an Execution Engine Plan

To set an attribute within an EE plan use the following snippet replacing the "my-attribute-name" with the system name of the field on your form you want to update

 

var updateMyAttribute = function(ev, ctx, log) {

    log.Information(ctx.planName + ": Started updateMyAttribute '" + ctx.sharedoId + "'");

 

    var myAttribute= actions.sharedo.Http.Post("/api/v1/public/workItem/" + ctx.sharedoId + "/attributes/" + "my-attribute-name", { "value": "44000492" }).Result;

 

    log.Information(ctx.planName + ": Finished updateMyAttribute '" + ctx.sharedoId + "'");

 

};