Commit 310ffca1 by 杨清松

用印审批流

parent 7f20fccd
package com.xyst.dinas.oa.config;
import java.util.ArrayList;
import java.util.List;
import org.springframework.context.annotation.Bean;
import com.beecode.inz.workflow.config.BizTypeInfo;
import com.beecode.inz.workflow.config.BizTypeWorkflowConfiguration;
import com.beecode.inz.workflow.config.ProcessConfiguration;
import com.beecode.inz.workflow.config.TriggerAction;
import com.beecode.inz.workflow.config.TriggerCondition;
import com.xyst.dinas.oa.constant.SealBorrowConstant;
public class OaConfiguration {
//用印审批工作流
@Bean(SealBorrowConstant.WORKFLOW_SEALBORROW)
public BizTypeWorkflowConfiguration createSealBorrowBizTypeInfo() {
BizTypeInfo bizTypeInfo = new BizTypeInfo(SealBorrowConstant.BIZ_TYPE,
SealBorrowConstant.BIZ_TITLE, SealBorrowConstant.ENTITY);
BizTypeWorkflowConfiguration configuration = new BizTypeWorkflowConfiguration(bizTypeInfo);
//configuration.setLicenseKey("md_property");
TriggerCondition triggerCondition = new TriggerCondition();
configuration.setTriggerCondition(triggerCondition);
List<TriggerAction> triggerActions = new ArrayList<>();
triggerActions.add(new TriggerAction("SUBMIT",
"提交"));
triggerCondition.setTriggerActions(triggerActions);
ProcessConfiguration processConfig = new ProcessConfiguration();
processConfig.setProcessEventListener(SealBorrowConstant.SEALBORROWLISTENER);
configuration.setProcessConfiguration(processConfig);
return configuration;
}
}
package com.xyst.dinas.oa.constant;
public interface SealBorrowConstant {
/**
* 流程配置
*/
String WORKFLOW_SEALBORROW = "com.xyst.dinas.oa.datamodel.config.SealBorrow";
/**
* 业务类型名称
*/
String BIZ_TYPE = "SealBorrow";
/**
* 业务类型标题
*/
String BIZ_TITLE = "证章借出";
/**
* 实体名
*/
String ENTITY = "com.xyst.dinas.oa.datamodel.SealBorrow";
/**
* 流程监听
*/
public static final String SEALBORROWLISTENER = "com.xyst.dinas.oa.listener";
}
package com.xyst.dinas.oa.listener;
import org.springframework.beans.factory.annotation.Autowired;
import com.beecode.bap.workflow.core.BizProcessState;
import com.beecode.inz.workflow.listener.InzBizProcessEvent;
import com.beecode.inz.workflow.listener.InzBizProcessEventListener;
public class SealBorrowProcessEventListener implements InzBizProcessEventListener {
@Override
public void beforeProcessStarted(InzBizProcessEvent event) {
//do nothing
}
@Override
public void afterProcessStarted(InzBizProcessEvent event) {
//do nothing
}
@Override
public void beforeProcessCompleted(InzBizProcessEvent event) {
//do nothing
}
@Override
public void afterProcessCompleted(InzBizProcessEvent event) {
}
}
dependencies {
compile "com.beecode:inz.workflow:${inzVersion}"
}
jar {
archiveName = "inz.workflow.metadata_1.0.0.SNAPSHOT.jma"
}
\ No newline at end of file
rootProject.name = "inz.workflow.metadata"
\ No newline at end of file
<model>
<header>
<type>bcp.participant.Participant</type>
<package>com.beecode.inz.workflow.participant</package>
<name>CommonParticipant</name>
<title>普通审批参与者策略</title>
<tags></tags>
<description>支持按用户、部门、角色计算参与则,结果为职员</description>
</header>
<content>
<participation-strategy id='4fe95b1b-1a14-4af4-a57a-dc2f8abe4f54'>
<input title='职员'>
<name>staffs</name>
<description>json数组</description>
<type>string</type>
</input>
<input title='部门'>
<name>departments</name>
<description>json数组</description>
<type>string</type>
</input>
<input title='角色'>
<name>roles</name>
<description>json数组</description>
<type>string</type>
</input>
<implementation runtime='java' extension='com.beecode.inz.workflow.participant.CommomParticipantStrategy'></implementation>
</participation-strategy>
</content>
</model>
\ No newline at end of file
<model>
<header>
<type>bcp.participant.Participant</type>
<package>com.beecode.inz.workflow.participant</package>
<name>DepartmentPicByLevelParticipant</name>
<title>层级负责人审批</title>
<tags></tags>
<description></description>
</header>
<content>
<participation-strategy id='82fd946d-ec0e-4055-b507-8624e0c57556'>
<input title='提交人Id'>
<name>submitterId</name>
<description></description>
<type>string</type>
</input>
<input title='层级'>
<name>level</name>
<description></description>
<type>int</type>
</input>
<implementation runtime='java' extension='com.beecode.inz.workflow.participant.DepartmentPicByLevelParticipantStrategy'></implementation>
</participation-strategy>
</content>
</model>
\ No newline at end of file
<model>
<header>
<type>bcp.participant.Participant</type>
<package>com.beecode.inz.workflow.participant</package>
<name>FollowerMemberPicParticipant</name>
<title>团队负责人审批</title>
<tags></tags>
<description></description>
</header>
<content>
<participation-strategy id='76357756-6acd-40cb-b230-40e9f2f23bbc'>
<input title='业务类型标识'>
<name>bizTypeName</name>
<description></description>
<type>string</type>
</input>
<input title='业务数据Id'>
<name>bizDataId</name>
<description></description>
<type>uuid</type>
</input>
<implementation runtime='java' extension='com.beecode.inz.workflow.participant.FollowerMemberPicParticipantStrategy'></implementation>
</participation-strategy>
</content>
</model>
\ No newline at end of file
<model>
<header>
<type>bcp.participant.Participant</type>
<package>com.beecode.inz.workflow.participant</package>
<name>SubmitDeptPathAppointRoleParticipant</name>
<title>提交人所在部门路径上指定角色</title>
<tags></tags>
<description></description>
</header>
<content>
<participation-strategy id='11e95b1b-1a14-4af4-a57a-dc2f8abe4f54'>
<input title='提交人Id'>
<name>submitterId</name>
<description></description>
<type>string</type>
</input>
<input title='角色'>
<name>roles</name>
<description>json数组</description>
<type>string</type>
</input>
<implementation runtime='java' extension='com.beecode.inz.workflow.participant.SubmitDeptPathAppointRoleParticipantStrategy'></implementation>
</participation-strategy>
</content>
</model>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<model>
<header>
<type>inz.query.Query</type>
<package>com.beecode.inz.workflow.query</package>
<name>ApprovalTask</name>
<title>审批任务查询</title>
<description></description>
</header>
<content>
<customQuery id="857fbab8-2715-4723-8cf7-be4941ba44de">
<kclass>com.beecode.inz.workflow.datamodel.InzApprovalTask</kclass>
<dataProcessor>com.beecode.inz.workflow.query.InzApprovalTaskQueryDataProcessor</dataProcessor>
<innerScene title="待处理">
<id>0c4b92d3-040f-4390-b9c0-8f0747dd0f9c</id>
<javaImplement>com.beecode.inz.workflow.internal.scene.ToDoTask</javaImplement>
<defaultExecute></defaultExecute>
<hide></hide>
</innerScene>
<innerScene title="已处理">
<id>aae59d63-4cc9-412b-a9d8-604ecf8bfa82</id>
<javaImplement>com.beecode.inz.workflow.internal.scene.ProcessedTask</javaImplement>
<defaultExecute></defaultExecute>
<hide></hide>
</innerScene>
<field title="id">
<name>id</name>
<type>uuid</type>
<ref>
<type></type>
<name></name>
</ref>
<description></description>
</field>
<field title="对象名称">
<name>bizObjectName</name>
<type>string</type>
<ref>
<type></type>
<name></name>
</ref>
<description></description>
</field>
<field title="业务类型标识">
<name>bizTypeName</name>
<type>string</type>
<ref>
<type></type>
<name></name>
</ref>
<description></description>
</field>
<field title='业务类型标题'>
<name>bizTypeTitle_v</name>
<type>string</type>
<ref>
<type></type>
<name></name>
</ref>
<description></description>
</field>
<field title="业务数据id">
<name>bizDataId</name>
<type>uuid</type>
<ref>
<type></type>
<name></name>
</ref>
<description></description>
</field>
<field title="收到审批时间">
<name>startTime</name>
<type>datetime</type>
<ref>
<type></type>
<name></name>
</ref>
<description></description>
</field>
<field title="审批流程名称">
<name>startTime</name>
<type>datetime</type>
<ref>
<type></type>
<name></name>
</ref>
<description></description>
</field>
<field title="结束时间">
<name>finishTime</name>
<type>datetime</type>
<ref>
<type></type>
<name></name>
</ref>
<description></description>
</field>
<field title="任务名称">
<name>taskName</name>
<type>string</type>
<ref>
<type></type>
<name></name>
</ref>
<description></description>
</field>
<field title="任务标题">
<name>title</name>
<type>string</type>
<ref>
<type></type>
<name></name>
</ref>
<description></description>
</field>
<field title="任务状态">
<name>taskState</name>
<type>int</type>
<ref>
<type></type>
<name></name>
</ref>
<description></description>
</field>
<field title="任务参数">
<name>parameters</name>
<type>string</type>
<ref>
<type></type>
<name></name>
</ref>
<description></description>
</field>
<field title="审批结果">
<name>result</name>
<type>string</type>
<ref>
<type></type>
<name></name>
</ref>
<description></description>
</field>
<field title="审批意见">
<name>suggestion</name>
<type>string</type>
<ref>
<type></type>
<name></name>
</ref>
<description></description>
</field>
<field title="流程定义标题">
<name>processInstance.workflow.workflowDefinition.title</name>
<type>string</type>
<ref>
<type></type>
<name></name>
</ref>
<description></description>
</field>
<field title="流程实例id">
<name>processInstance.id</name>
<type>uuid</type>
<ref>
<type></type>
<name></name>
</ref>
<description></description>
</field>
<field title="流程发起人标题">
<name>bizProcess.submitter.name</name>
<type>uuid</type>
<ref>
<type></type>
<name></name>
</ref>
<description></description>
</field>
<field title="流程实例业务类型标识">
<name>bizProcess.bizTypeName</name>
<type>string</type>
<ref>
<type></type>
<name></name>
</ref>
<description></description>
</field>
</customQuery>
</content>
</model>
<model>
<header>
<type>inz.query.Query</type>
<package>com.beecode.inz.workflow.query</package>
<name>BizProcess</name>
<title>工作流业务流程查询</title>
<tags></tags>
<description></description>
</header>
<content>
<customQuery id='fa32de24-a3f8-4270-8c6b-7b537e9a119d'>
<kclass>com.beecode.inz.workflow.datamodel.InzBizProcess</kclass>
<dataProcessor>com.beecode.inz.workflow.query.InzBizProcessQueryDataProcessor</dataProcessor>
<innerScene title='进行中'>
<id>ecfb64aa-f7a7-46ea-a705-31cf9e4b7fe9</id>
<javaImplement>com.beecode.inz.workflow.internal.scene.UnderwayProcess</javaImplement>
<defaultExecute></defaultExecute>
<hide></hide>
</innerScene>
<innerScene title='已结束'>
<id>d5373cb4-4b63-43c4-8a5b-16d3f8079e57</id>
<javaImplement>com.beecode.inz.workflow.internal.scene.FinishedProcess</javaImplement>
<defaultExecute></defaultExecute>
<hide></hide>
</innerScene>
<field title='id'>
<name>id</name>
<type>uuid</type>
<ref>
<type></type>
<name></name>
</ref>
<description></description>
</field>
<field title='数据模型标识'>
<name>kclass</name>
<type>string</type>
<ref>
<type></type>
<name></name>
</ref>
<description></description>
</field>
<field title='对象名称'>
<name>bizObjectName</name>
<type>string</type>
<ref>
<type></type>
<name></name>
</ref>
<description></description>
</field>
<field title='业务类型标识'>
<name>bizTypeName</name>
<type>string</type>
<ref>
<type></type>
<name></name>
</ref>
<description></description>
</field>
<field title='业务类型标题'>
<name>bizTypeTitle_v</name>
<type>string</type>
<ref>
<type></type>
<name></name>
</ref>
<description></description>
</field>
<field title='触发动作'>
<name>triggerAction_v</name>
<type>string</type>
<ref>
<type></type>
<name></name>
</ref>
<description></description>
</field>
<field title='业务数据id'>
<name>bizDataId</name>
<type>uuid</type>
<ref>
<type></type>
<name></name>
</ref>
<description></description>
</field>
<field title='工作流状态'>
<name>workflowState</name>
<type>int</type>
<ref>
<type></type>
<name></name>
</ref>
<description></description>
</field>
<field title='提交人名称'>
<name>submitter.name</name>
<type>string</type>
<ref>
<type></type>
<name></name>
</ref>
<description></description>
</field>
<field title='提交时间'>
<name>submitTime</name>
<type>datetime</type>
<ref>
<type></type>
<name></name>
</ref>
<description></description>
</field>
<field title='流程最后流转时间'>
<name>processInstance.lastTransferTime</name>
<type>string</type>
<ref>
<type></type>
<name></name>
</ref>
<description></description>
</field>
<field title='审批流程标题'>
<name>processInstance.workflow.workflowDefinition.title</name>
<type>string</type>
<ref>
<type></type>
<name></name>
</ref>
<description></description>
</field>
<field title="流程实例业务类型标识">
<name>bizProcess.bizTypeName</name>
<type>string</type>
<ref>
<type></type>
<name></name>
</ref>
<description></description>
</field>
</customQuery>
</content>
</model>
\ No newline at end of file
<model>
<header>
<type>inz.query.Query</type>
<package>com.beecode.inz.workflow.query</package>
<name>WorkflowDefinition</name>
<title>工作流定义查询</title>
<tags></tags>
<description></description>
</header>
<content>
<customQuery id='8e5dfb20-1b4e-4d6b-a44b-438ef6d09e91'>
<kclass>com.beecode.inz.workflow.datamodel.InzWorkflowDefinition</kclass>
<dataProcessor>com.beecode.inz.workflow.query.InzWorkflowDefinitionQueryDataProcessor</dataProcessor>
<innerScene title="使用中">
<id>0c4b92d3-040f-4390-b9c0-8f0747dd0f9c</id>
<javaImplement>com.beecode.inz.workflow.internal.scene.workflowdefinition.UsingScene</javaImplement>
<defaultExecute></defaultExecute>
<hide></hide>
</innerScene>
<innerScene title="已停用">
<id>aae59d63-4cc9-412b-a9d8-604ecf8bfa82</id>
<javaImplement>com.beecode.inz.workflow.internal.scene.workflowdefinition.DisabledScene</javaImplement>
<defaultExecute></defaultExecute>
<hide></hide>
</innerScene>
<innerScene title="已作废">
<id>aae59d63-4c11-412b-a9d8-114ecf8bfa11</id>
<javaImplement>com.beecode.inz.workflow.internal.scene.workflowdefinition.DiscardScene</javaImplement>
<defaultExecute></defaultExecute>
<hide></hide>
</innerScene>
<field title='id'>
<name>id</name>
<type>uuid</type>
<ref>
<type></type>
<name></name>
</ref>
<description></description>
</field>
<field title='名称'>
<name>name</name>
<type>string</type>
<ref>
<type></type>
<name></name>
</ref>
<description></description>
</field>
<field title='标题'>
<name>title</name>
<type>string</type>
<ref>
<type></type>
<name></name>
</ref>
<description></description>
</field>
<field title='创建时间'>
<name>createTime</name>
<type>datetime</type>
<ref>
<type></type>
<name></name>
</ref>
<description></description>
</field>
<field title='创建人名称'>
<name>creator.name</name>
<type>string</type>
<ref>
<type></type>
<name></name>
</ref>
<description></description>
</field>
<field title='修改时间'>
<name>modifyTime</name>
<type>datetime</type>
<ref>
<type></type>
<name></name>
</ref>
<description></description>
</field>
<field title='修改人名称'>
<name>modifier.name</name>
<type>string</type>
<ref>
<type></type>
<name></name>
</ref>
<description></description>
</field>
<field title='流程定义版本'>
<name>definitionVersion</name>
<type>string</type>
<ref>
<type></type>
<name></name>
</ref>
<description></description>
</field>
<field title='业务类型标识'>
<name>bizTypeName</name>
<type>string</type>
<ref>
<type></type>
<name></name>
</ref>
<description></description>
</field>
<field title='工作流配置'>
<name>workflowConfig</name>
<type>string</type>
<ref>
<type></type>
<name></name>
</ref>
<description></description>
</field>
<field title='流程定义内容'>
<name>definitionContent</name>
<type>string</type>
<ref>
<type></type>
<name></name>
</ref>
<description></description>
</field>
<field title='触发动作'>
<name>triggerAction_v</name>
<type>string</type>
<ref>
<type></type>
<name></name>
</ref>
<description></description>
</field>
<field title='业务类型标题'>
<name>bizTypeTitle_v</name>
<type>string</type>
<ref>
<type></type>
<name></name>
</ref>
<description></description>
</field>
<field title='流程状态'>
<name>definitionState</name>
<type>int</type>
<ref>
<type></type>
<name></name>
</ref>
<description></description>
</field>
</customQuery>
</content>
</model>
\ No newline at end of file
<model>
<header>
<type>bcp.task.Task</type>
<package>com.beecode.inz.workflow.task</package>
<name>ApprovalTaskDefinition</name>
<title>审批任务定义</title>
<tags></tags>
<description></description>
</header>
<content>
<task-definition id='b2a081fe-dcc8-457d-b899-ae6739773095' type='com.beecode.inz.workflow.datamodel.InzApprovalTask' taskEventListener='com.beecode.inz.workflow.listener.TaskEventListenerImpl'>
<parameters>
<input title='业务对象名称'>
<name>bizObjectName</name>
<type>string</type>
<description></description>
</input>
<input title='业务数据id'>
<name>bizDataId</name>
<type>uuid</type>
<description></description>
</input>
<input title='业务类型标识'>
<name>bizTypeName</name>
<type>string</type>
<description></description>
</input>
<output title='审批结果'>
<name>result</name>
<type>int</type>
<description></description>
</output>
</parameters>
</task-definition>
</content>
</model>
\ No newline at end of file
......@@ -3,8 +3,10 @@ rootProject.name = "inz-metadata"
includeBuild("../backend") {
dependencySubstitution {
substitute module('com.beecode:xyst.dinas.oa') with project(':xyst.dinas.oa')
substitute module('com.beecode:inz.workflow') with project(':inz.workflow')
}
}
include "xyst.dinas.oa.metadata"
include "inz.workflow.metadata"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment