当前位置: 首页 > news >正文

深圳网站建设大公司手机网站在线生成

深圳网站建设大公司,手机网站在线生成,网站做cpa推广引流,关键词排名查询工具免费#xff08;文章来宾与北美红帽公司高级解决方案架构师杰伊保拉杰共同撰写#xff09; 几周的提示与技巧文章将深入探讨JBoss BPM Suite#xff0c;特别是有关如何在两个流程之间进行通信的问题。 在进入解决方案详细信息之前#xff0c;让我们首先约束将要讨论的用例。 … 文章来宾与北美红帽公司高级解决方案架构师杰伊·保拉杰共同撰写 几周的提示与技巧文章将深入探讨JBoss BPM Suite特别是有关如何在两个流程之间进行通信的问题。 在进入解决方案详细信息之前让我们首先约束将要讨论的用例。 关于两个进程之间的通信方式可能会有很多解释但是我们将从这里开始以一种简单的方式让一个进程调用另一个进程。 我们还将通过提供的RestAPI展示这种简单用法我们将利用该API提供可部署的工件您可以将其用作任何BPM流程中的自定义工作处理程序。 该工件是一个我们标记为RestApi.java的类它包含设置和详细信息使您可以从现有过程中启动另一个过程。 在本文结尾处我们提供了完整的课程但首先我们仔细研究了各个活动部分。 每个类的顶部包括将要使用的各种导入的对象或类我们对“知识就是一切”KIEAPI组件最感兴趣您会在其中找到它们以及代表我们的医疗保健示例领域模型的一些对象。 package org.jboss.demo.heathcare;import java.net.MalformedURLException; import java.net.URL; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map;// JBoss BPM Suite API import org.kie.api.runtime.KieSession; import org.kie.api.runtime.manager.RuntimeEngine; import org.kie.api.runtime.process.ProcessInstance; import org.kie.services.client.api.RemoteRestRuntimeEngineFactory;// Domain model. import com.redhat.healthcare.CaseContext; import com.redhat.healthcare.Doctor; import com.redhat.healthcare.PatientInfo; import com.redhat.healthcare.Prescription; import com.redhat.healthcare.Rxdetail; 接下来我们将找到RestAPI类的实际开始我们在其中设置使用API​​所需的一些属性以及一个构造函数以确保JBoss BPM Suite服务器正在运行。 请注意流程部署ID以及用户名和密码都是虚构的因此与实际流程数据的任何相似之处都是偶然的。 String deploymentId com.redhat.healthcare:patients:1.0; String bpmUrl http://localhost:8080/business-central; String userId admin; String password bpmsuite1!; URL deploymentUrl;// Constructor to check for availability of BPM server. // public RestApi() {super();try {this.deploymentUrl new URL();} catch (MalformedURLException e) {e.printStackTrace();} } 测试的URL假定是基本的默认本地安装因此如果您的安装使用其他设置则需要对此进行调整。 下一个代码片段重点介绍了一种核心帮助程序方法该方法为我们提供了对运行时引擎的引用。 这是通过RestAPI将我们绑定到特定部署com.redhat.healthcarePatients1.0的引擎使我们可以启动该部署中的流程。 // Get a runtime engine based on RestAPI and our deployment. // public RuntimeEngine getRuntimeEngine() {RemoteRestRuntimeEngineFactory restSessionFactory new RemoteRestRuntimeEngineFactory(deploymentId, deploymentUrl, userId, password);// create REST requestRuntimeEngine engine restSessionFactory.newRuntimeEngine();return engine; } 有了运行时引擎我们现在可以访问和创建会话然后我们就可以在其中启动流程实例。 调用以下方法来启动流程实例并且仅出于清楚起见该方法包含创建要提交到我们的流程中的数据集合。 您应该很容易看到可以根据需要将其抽象出来以便将过程变量映射到您的类中。 // Setup our session, fill the data needed for process // instances and starting our process. // public void startProcess() {String taskUserId userId;// create REST request.RuntimeEngine engine getRuntimeEngine();KieSession ksession engine.getKieSession();// setup data for submission to process instance.Doctor doctor new Doctor();doctor.setAddress(3018 winter);doctor.setCity(madison);doctor.setGender(M);doctor.setGroupId(UW1001);doctor.setHospital(1001);doctor.setName(jey);doctor.setState(WI);PatientInfo pat new PatientInfo();pat.setAge(12);pat.setName(jey);pat.setSymbtom(Diabetes Insipidus);pat.setType(Diabetes);Rxdetail rxdetail new Rxdetail();Listrxdetail details new ArrayListrxdetail();rxdetail.setDrugName(xx);rxdetail.setOther(red);rxdetail.setQty(11);rxdetail.setRxNum(11);details.add(rxdetail);CaseContext cont new CaseContext();cont.setApprovalReq(N);cont.setApprovalReq(Supervisor);Prescription prescription new Prescription();prescription.setDoctor(doctor);prescription.setPatientInfo(pat);prescription.setRxdetails(details);// collect all data in our map.Mapstring object params new HashMapstring object();params.put(prescription, prescription);params.put(caseContext, cont);// start process.ProcessInstance processInstance ksession.startProcess(healthcare.patientCaseProcess, params);// verify process started.System.out.println(process id processInstance.getProcessId());System.out.println(process id processInstance.getId()); } 通过这种方法我们可以设置流程所需的医生患者和其他医疗详细信息将它们收集到地图中然后将其提交给流程实例以将其全部启动。 现在我们可以将所有这些联系在一起以便在调用此方法时运行的主类将设置我们的RestAPI并在每次调用它时启动一个新的流程实例。 // Start our process by using RestAPI. // public static void main(String[] ar) {RestApi api new RestApi();api.startProcess(); } 我们希望通过本医学示例的简单介绍可以使您了解如何利用提供的JBoss BPM Suite RestAPI来发挥自己的优势。 在这种情况下我们将其用于与BPM服务器上部署的任何其他进程与特定部署中的特定进程进行通信。 这是RestApi类 package org.jboss.demo.heathcare;import java.net.MalformedURLException; import java.net.URL; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map;// JBoss BPM Suite API import org.kie.api.runtime.KieSession; import org.kie.api.runtime.manager.RuntimeEngine; import org.kie.api.runtime.process.ProcessInstance; import org.kie.services.client.api.RemoteRestRuntimeEngineFactory;// Domain model. import com.redhat.healthcare.CaseContext; import com.redhat.healthcare.Doctor; import com.redhat.healthcare.PatientInfo; import com.redhat.healthcare.Prescription; import com.redhat.healthcare.Rxdetail;String deploymentId com.redhat.healthcare:patients:1.0; String bpmUrl http://localhost:8080/business-central; String userId admin; String password bpmsuite1!; URL deploymentUrl;// Constructor to check for availability of BPM server. // public RestApi() {super();try {this.deploymentUrl new URL();} catch (MalformedURLException e) {e.printStackTrace();} }// Get a runtime engine based on RestAPI and our deployment. // public RuntimeEngine getRuntimeEngine() {RemoteRestRuntimeEngineFactory restSessionFactory new RemoteRestRuntimeEngineFactory(deploymentId, deploymentUrl, userId, password);// create REST requestRuntimeEngine engine restSessionFactory.newRuntimeEngine();return engine; }// Setup our session, fill the data needed for process // instances and starting our process. // public void startProcess() {String taskUserId userId;// create REST request.RuntimeEngine engine getRuntimeEngine();KieSession ksession engine.getKieSession();// setup data for submission to process instance.Doctor doctor new Doctor();doctor.setAddress(3018 winter);doctor.setCity(madison);doctor.setGender(M);doctor.setGroupId(UW1001);doctor.setHospital(1001);doctor.setName(jey);doctor.setState(WI);PatientInfo pat new PatientInfo();pat.setAge(12);pat.setName(jey);pat.setSymbtom(Diabetes Insipidus);pat.setType(Diabetes);Rxdetail rxdetail new Rxdetail();Listrxdetail details new ArrayListrxdetail();rxdetail.setDrugName(xx);rxdetail.setOther(red);rxdetail.setQty(11);rxdetail.setRxNum(11);details.add(rxdetail);CaseContext cont new CaseContext();cont.setApprovalReq(N);cont.setApprovalReq(Supervisor);Prescription prescription new Prescription();prescription.setDoctor(doctor);prescription.setPatientInfo(pat);prescription.setRxdetails(details);// collect all data in our map.Mapstring object params new HashMapstring object();params.put(prescription, prescription);params.put(caseContext, cont);// start process.ProcessInstance processInstance ksession.startProcess(healthcare.patientCaseProcess, params);// verify process started.System.out.println(process id processInstance.getProcessId());System.out.println(process id processInstance.getId()); }// Start our process by using RestAPI. // public static void main(String[] ar) {RestApi api new RestApi();api.startProcess(); }翻译自: https://www.javacodegeeks.com/2014/12/quick-guide-dissecting-jboss-bpm-cross-process-communication.html
http://www.pierceye.com/news/20301/

相关文章:

  • 相册网站开发学做网站根学ps有前途吗
  • 温州网站网站建设百度站长平台查询
  • 网站查询工具免费自助建站
  • 自己模板做网站制作书签简单又漂亮
  • 西安网站seo工作室汕头免费自助建站模板
  • 哪些国家网站无须备案网站建设需要那些人才
  • 免费空间+网站空间+虚拟主机wordpress底部黑色的版权修改
  • 中国建设银行官网站额度申请搭建平台高质量
  • 深圳网站建设 卓越创php建站系统
  • 网站的特点建设电商网站的总结
  • ota平台网站建设自己做卖东西网站
  • 常州外贸网站建设公司成都最好的seo外包
  • 事件网站推广视频播放网站模板
  • 网站注销申请书出租房千万不要托管
  • 网站关键词在哪设置建设工程质量安全监督站官方网站
  • 网站开发与维护 专业亚马逊跨境电商开店
  • 上海网站建设 微信开发公司好的h5网站
  • 自己可以建设网站卖东西吗wordpress国内几大主题
  • 做微网站需要什么哪些网站需要做分享按钮
  • 建设网站有什么特点特色WordPress pdo mysql
  • 东城响应式网站建设用wordpress制作表单
  • 西安昆奇网站建设深圳网站优化
  • 肥西县建设发展局网站wordpress 外链裁剪
  • 建站新体验桐乡做网站
  • 深圳苏州旅游网站建设服务上海建设工程质监局网站
  • 多媒体资源库网站建设网站动态背景欣赏
  • 公司网站建设维护合同制作宣传片的步骤
  • 成都网站快速排名提升做兼职设计去哪个网站
  • 廊坊网站建设案例河北建设工程信息网可上中项网
  • 松江品划做网站公司网站仿制公司