一般工作流程-问题/ez 组件工作流程
我寻找了一个用 php 编写的工作流引擎,并找到了 ez 组件工作流类(http: //ezcomponents.org/docs/api/latest/introduction_Workflow.html)。使用示例后,我对(一般)工作流程功能的理解存在两个一般问题:
1.)如果我定义了一般工作流程(例如在审阅后发布文章) - 每篇发布的文章实际上已经开始我的一般发布工作流程的新“实例”。这是对的吗?或者,当相同的工作流程用于许多不同的文章/数据集时,我该如何处理?
2.) 基础应用程序如何与工作流组件一起工作?如果在发布过程中必须向必须审阅文章的人发送一封电子邮件 - 用于发送此电子邮件的代码放在哪里?直接在工作流程中(例如在 WorkflowServiceObject 中的执行方法中)发送电子邮件是否是正确的方法?或者电子邮件的发送是否只是放置在应用程序代码中(保存文章或设置文章的状态后),并且工作流的状态必须在发送电子邮件后设置为下一个节点/级别?
感谢您的回答(对我的英语不好感到抱歉;-))!
蒂莫
I looked for a workflow engine written in php and found the ez components workflow-classes (http://ezcomponents.org/docs/api/latest/introduction_Workflow.html). After work with the examples I have two general problems with the understanding of the (general) workflow-functionality:
1.) If I have defined a general workflow (for example for publish an article after a review) – each posted article has actually start a new “instance” of my general publish-workflow. Is this right? Or how does I handle it when the same workflow is used for many different articles/data-sets?
2.) How does the basis-application have to work with the workflow-component? If in the publish-process an email has to send to the person who has to review the article – where has the code placed for sending this email? Is it the right approach to send the email directly in the workflow, for example in the execute-method in a WorkflowServiceObject? Or does the sending of the email just placed in the application-code (after save an article or set the state of an article) and the state of the workflow has to set to the next node/level after sending the email?
Thanks for some answer (and sorry for my bad english ;-))!
Timo
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我也是 eZc 工作流程的新手,但我想我可以提供帮助,至少我也希望如此。
您有一个工作流正在处理的实体,这里您的实体是您的文章,因此您需要将您的文章链接到您的工作流实例,例如您的文章可以具有工作流实例的 ID。
还有一件事,我知道这是您问题中的一个示例,但让我说,在用户服务进程中发送电子邮件不是一个好主意,最好将电子邮件放在队列中并有一个 cron 作业来执行按预定流程发送队列中的电子邮件。
I also new in eZc workflow but I think I can help, at least I wish too.
You have an entity that the workflow is working on, here your entity is your article so you need to link you article to your workflow instance for example your article can have the Id of your workflow instance.
Just one other thing, I know was a sample in you question but let me say, It is not a good idea to sending an email with in a user serving process, its better to put the email on a queue and have a cron job to send the emails from the queue in scheduled proccess.