在我的AngularApp中,我将使用REST向用户展示当前的工作流。到目前为止没有问题,通常是:
获取/进程-定义/{id}/xml
和
bpmn.io查看器。
但是,可以突出显示当前任务或获得工作流的特殊实例,同时突出显示当前任务吗?
谢谢你的帮助。
发布于 2017-12-06 10:48:14
1.实际执行任务
调用http://localhost:8080/engine-rest/task/?processInstanceId=<processInstanceId>返回一个使用taskDefinitionKey的json。
https://docs.camunda.org/manual/latest/reference/rest/task/get-query/
2.任务的样式
您可以添加样式类,从而突出显示任务。
viewer.importXML(diagramXML, function() {
var canvas = viewer.get('canvas');
canvas.addMarker('<<TaskId>>', 'highlight');
});颜色的CSS:
.highlight:not(.djs-connection) .djs-visual > :nth-child(1) {
fill: green !important; /* color elements as green */
}这个例子来自https://github.com/bpmn-io/bpmn-js-examples/tree/master/colors#adding-colors
发布于 2018-12-20 09:14:11
谢谢你帮我。要使它像您所描述的那样工作,您必须将ViewEncapsulation更改为Angular.ts文件中的ViewEncapsulation.None。
https://stackoverflow.com/questions/47670059
复制相似问题