外部系统推数据到本地启动流程,流程图-人工活动内无需设参与者。
流程图:流程启动后不会再第一个节点,而是在第一个节点后面的节点(根据条件走不通节点)
String componentName = "com.sgai.fssc.workflowiteration.receivable.havaProductionAndMarketing";//逻辑构件名称
String operationName = "InterfaceHavaProductionAndMarket";//逻辑流名称
ILogicComponent logicComponent = LogicComponentFactory.create(componentName);//创建启动流程的方法
BPSServiceClientFactory.getLoginManager().setCurrentUser(employee.getString("empid"),employee.getString("empname"));//
为本次调用请求设置当前登录用户.
用户可以在自己编写的过滤器中加入如下代码,将session中的userID和userName设置到BPSServiceClient BPSServiceClient.setCurrentUser(userID,userName);
也可以将BPS已经实现好的BPSRequestFilter配置到应用下的web.xml中使用
logicComponent.invoke(operationName, params);//启动流程,调用启动流程的逻辑流com.sgai.fssc.workflowiteration.receivable.havaProductionAndMarketing.InterfaceHavaProductionAndMarket.biz
逻辑流:
setRelativeData运算逻辑:
@Bizlet("给participant设置")
public void setParticipant(long processInstID,String empid,String empname) throws WFServiceException{
WFParticipant participant = new WFParticipant(empid, empname, "emp");
BPSServiceManagerImpl.setRelativeData(processInstID, "WP" , participant);//此处第二个参数是什么流程图第一个节点的参与者相关数据就是什么
}