CRM, C4C和Hybris的工作流简介

CRM的例子

Step by Step to debug IC inbox workflow WS14000164

C4C

CRM, C4C和Hybris的工作流简介

Hybris

Hybris workflow的框架实现代码在这个folder里:

CRM, C4C和Hybris的工作流简介

而应用层面使用的workflow,和ABAP workflow一样有所谓workflow template的概念。下图是ABAP workflow template的一个例子:

CRM, C4C和Hybris的工作流简介

Hybris workflow:

CRM, C4C和Hybris的工作流简介

也是通过impex定义的:

CRM, C4C和Hybris的工作流简介

CRM, C4C和Hybris的工作流简介

impex 中包括 WorkflowTemplate, WorkflowActionTemplate, WorkflowDecisionTemplate, WorkflowActionTemplateLinkTemplateRelation 这四种类型的model

1. 一个workflow至少有3三 种类型(start/normal/end)的 action

2. 一个action最少有一种decision

3. 一个decision 可以通过 WorkflowActionTemplateLinkTemplateRelation 链接到下一个action上 直到结束节点 end.

创建workflow及触发decision:


public void autoCreateWorkFlow(PrincipalModel principal, KeyInfoModel info) {
validateParameterNotNull(principal, "principal model cannot be null"); UserModel admin = userService.getUserForUID(ADMIN_CODE); WorkflowTemplateModel workflowTemplate = workflowTemplateService.getWorkflowTemplateForCode(workflowTemplateCode); //create a new workflow for given workflowtemplate final WorkflowModel workflow = workflowService.createWorkflow(workflowTemplate, admin); //add attachment for workflow final WorkflowItemAttachmentModel attachment = modelService.create(WorkflowItemAttachmentModel.class); AbstractOrderEntryModel orderEntry = info.getOrderEntry(); attachment.setItem(info.getOrderEntry()); attachment.setWorkflow(workflow); attachment.setCode(orderEntry.getPk()+"_OrderEntry"); this.modelService.save(attachment); this.modelService.refresh(attachment); workflow.setAttachments(Collections.singletonList(attachment)); workflowProcessingService.startWorkflow(workflow); this.autoDoStartDecision(workflow, admin); }

要获取更多Jerry的原创技术文章,请关注公众号"汪子熙"或者扫描下面二维码:

CRM, C4C和Hybris的工作流简介

CRM, C4C和Hybris的工作流简介

上一篇:Conjob For hybris


下一篇:jquery常用函数与方法