CRM的例子
Step by Step to debug IC inbox workflow WS14000164C4C
Custom recipient determination in workflow rule done on Account BOAutomatically send an Email notification to line manager via Workflow in Account applicationHybris
Hybris workflow的框架實(shí)現(xiàn)代碼在這個(gè)folder里:
而應(yīng)用層面使用的workflow,和ABAP workflow一樣有所謂workflow template的概念。下圖是ABAP workflow template的一個(gè)例子:
Hybris workflow:
也是通過impex定義的:
impex 中包括 WorkflowTemplate, WorkflowActionTemplate, WorkflowDecisionTemplate, WorkflowActionTemplateLinkTemplateRelation 這四種類型的model
1. 一個(gè)workflow至少有3三 種類型(start/normal/end)的 action
2. 一個(gè)action最少有一種decision
3. 一個(gè)decision 可以通過 WorkflowActionTemplateLinkTemplateRelation 鏈接到下一個(gè)action上 直到結(jié)束節(jié)點(diǎn) end.
創(chuàng)建workflow及觸發(fā)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的原創(chuàng)技術(shù)文章,請(qǐng)關(guān)注公眾號(hào)"汪子熙"
本站僅提供存儲(chǔ)服務(wù),所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請(qǐng)
點(diǎn)擊舉報(bào)。