npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

jc-bpmn-js-properties-panel-activiti

v1.1.10

Published

activiti

Downloads

18

Readme

工作流项目 - 流程图绘图插件:jc-bpmn-js-properties-panel-activiti.js

v 1.0.6

  1. 版本说明
    • 连接器添加connectorName属性

v 1.0.5

  1. 版本说明
    • 开始节点添加设置抄送人配置项

v 1.0.4

Release Notes

  1. 版本说明

    • 表单多选修改显示tag代码;表单key添加documentation元素;资源配置fields修改返参;
    • 设置经办者时,选择关系数据不单独设置属性,放在userinfo里面,判断是否只设置了部门没有设置角色(岗位),改变节点属性;
    • 修改办理人配置为资源配置;隐藏是否自动选人配置;
    • 修改连接器相关;
    • 修改serviceTask节点,实现方式activiti-implementation-select属性,只保留连接器,其余方式删除;
    • 办理类型选择非并行多实例时隐藏完成条件配置;修改完成条件为下拉选择框;
    • 当勾选了服务组件时,把办理设置、是否自动选人、办理类型设置隐藏,如果没勾选服务组件,把这三个显示;
    • 调整办理类型设置的顺序,放在是否自动选人下面,把服务组件放在办理设置上面;把办理类型f放在userGroup里面;
    • 修改排序组代码;添加是否自动选人组;
    • 将人员组放在基本信息中,修改排序、权限按钮、微流程标题样式;
    • factory下js文件的button元素删除data-disable=isDisabled属性【解决火狐浏览器无法点击按钮问题】;
    • 已发布的流程设计,多实例的完成条件可以修改;多实例类型添加bpmn:SubProcess子流程节点可以设置;
    • 多实例类型添加“多人并行异步“;
    • 用户节点添加超期设置;
  2. 示例图 示例1 示例2 示例3

v 0.0.2

Release Notes

  1. 版本说明
    • 连接线 右侧属性面板隐藏 监听扩展 面板

v 0.0.1

Release Notes

  1. 版本说明
    • 用户任务 右侧属性面板添加 人员 面板
      点击 设置 按钮根据弹框内所选人员信息反显
      用户任务及人员面板截图

    • 服务任务 右侧属性面板实现方式添加 消息通知 选项
      服务任务实现方式添加消息通知选项

    • 服务任务 右侧属性面板 连接器 面板
      点击 设置 按钮根据弹框内所选服务反显连接器信息及对应输入/输出参数
      服务任务及连接器面板截图

代码示例

以修改用户任务右侧面板为例:
/* 
* ./lib/factory/UserTextInputEntryFactory.js 
*/
...
// 点击设置按钮,暴露 userTaskSelectCallBack 函数,输出 1.右侧属性面板input框id;2.右侧属性面板input框dom元素上的属性;3.xml源文件中对应的dom节点id;
var defaultButtonAction = function(element, inputNode) {
    var input = domQuery('textarea[name="' + options.modelProperty + '"]', inputNode);
    outputs.userTaskSelectCallBack(options.element.id, 'activiti-' + resource.id, input.getAttribute('data-user-value'))
    return true;
};
...
// 通过index.js文件触发 get方法,获取到人员选择弹框返回的数据
resource.get = function(element, node) {
    var bo = getBusinessObject(element);
    var usertask =  (getElements(bo, 'activiti:Userproperties') || [])[0];
    var value = usertask && usertask.get('alias');
    return { alias: value};
}
// 通过触发 set方法,给xml源文件设置dom节点
resource.set = function(element, values, node) {
    businessObject = businessObject || getBusinessObject(element);
    var userinfos = node.querySelector('#activiti-' + resource.id).getAttribute('data-user-value')
    values.userinfos = userinfos
    ...
    var field = elementHelper.createElement('activiti:Userproperties', values, extensionElements, options.bpmnFactory);
    var usertaskElements = getElements(bo, 'activiti:Userproperties') || [];
    if (usertaskElements.length == 0) {
      commands.push(cmdHelper.addElementsTolist(element, extensionElements, 'values', [ field ]));
    } else {
      commands.push(cmdHelper.updateBusinessObject(element, extensionElements, {
        values: [ field ]
      }));
    }
    ...
}

/*
* ./lib/provider/activiti/parts/UserProps.js
*/
...
module.exports = function(group, element, bpmnFactory, translate) {
  if (is(element, 'bpmn:UserTask')) { // 可以在这里做类型判断
    group.entries.push(entryFactory.userTextField({
      id : 'userproperties',
      description : '', // 面板描述
      label : '节点维护信息', // 面板名称
      modelProperty : 'alias', // xml源文件dom节点的value属性名称
      prefix: 'userproperties', 
      element,
      bpmnFactory,
      disabled: function(){ // 是否禁用
        return true
      },
    }));
  }
}
...

/*
* ./lib/index.js
*/
module.exports = {
  ...
  // 用户选择
  userTaskSelectCallBack: () => {},
  setUserTask: (id, value, str) => {
    document.getElementById(id).value = str // 给右侧属性面板的input赋值
    document.getElementById(id).setAttribute('data-user-value',value) // 给右侧属性面板的dom元素input设置属性value
    var changeEvent = document.createEvent ("HTMLEvents"); 
    changeEvent.initEvent ("change", true, true);
    document.getElementById(id).dispatchEvent (changeEvent); // 刷新页面dom渲染数据
  },
  ...
}

其他说明

任务说明