Skip to content

Instantly share code, notes, and snippets.

@garyjoy
Created February 3, 2017 15:34
Show Gist options
  • Save garyjoy/7d385d3758bffc8eebf8be41a9b5e726 to your computer and use it in GitHub Desktop.
Save garyjoy/7d385d3758bffc8eebf8be41a9b5e726 to your computer and use it in GitHub Desktop.
Exposing a Client Side Human Service via a URL
var markup = "";
if (this.context.bpm.system.context.callerModelBranchId != null && this.context.bpm.system.context.callerModelBranchId.length > 0) {
markup = "<a href='/teamworks/executecf?modelID=?&branchID=" + this.context.bpm.system.context.callerModelBranchId + "&tw.local.processInstanceId=" + this.context.options.instanceId.get("value") + "' target=_blank>" + "Process Centre Link" + "</a>";
}
else if (this.context.bpm.system.context.callerModelSnapshotId != null && this.context.bpm.system.context.callerModelSnapshotId.length > 0) {
markup = "<a href='/teamworks/executecf?modelID=?&snapshotID=" + this.context.bpm.system.context.callerModelSnapshotId + "&tw.local.processInstanceId=" + this.context.options.instanceId.get("value") + "' target=_blank>" + "Process Server Link" + "</a>";
}
else {
console.error(“A meaningful error that indicates that you cannot create a link...");
}
this.context.element.getElementsByClassName(“myClassName")[0].innerHTML = markup;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment