最近在做Captaris Workflow 构建工作流应用项目,向Captaris Support Team提交后解决了在项目中遇到的两个问题中的一个:
1.The Model_Complete Event could not raise.
Hi there,
I want do some thing like 'Move to folder' or 'Rename the process' when all task down(The process is completed).
I did these but nothing happened:
1.On VS.net 2005 Captaris Disgner Form, double click the 'Complete' Event on the 'property' window to handle Model_Complete event.
2.On the appear code editor, write some code on the public void Model_Complete() method.
3.Compile and deploy the model.
4.Start debug and do all task done.
5.When all task completed, the process status is 'Completed' but Model_Complete() method never be load and run.
Please tell me why.
Thanks,
Johnson.
回答:
Hello Johnson,
You are right, using Model_Complete(0 it will not move the file and I will report this to our dev team. Instead of moving the file in Model.Complete, please move the file in the last task in the complete event.
Thank you
Regards,
Elena
我只能用第类的解决方法来完成这个功能了。
2.IProcess.MoveFile method not working?
Hello Elena,
If you find out that I can get service on workflow product, May I ask another question:
Why the Ready or Complete or Executing event of a task raise two times when the task is the last task on a model?
Example:
TaskCFO and TaskCIO linked TaskComplete, the two link execution logic is same as:
Common["Common/IsApproved"] == "1" && (Convert.ToDecimal(Common["Common/approvedBudgetAmount"]) / Convert.ToDecimal(Common["Common/USDExchangeRate"]) < 3000M ) (Common["Common/OverseaTravel"] != "1")
When TaskCIO completed, the TaskComplete Execution event raise just once,that is correct. But when TaskCFO completed, the TaskComplete Execution event raise two times, that is not correct. It's should just raise once as TaskCIO.
Please gird me how to fix it.
Johnson
回答:
Hi Johnson,
I was able to recreate this error (do you have HF 4 installed on your machine?). However, the issue is with the link and we knew about this issue with our engine (It actually shows as fixed in our HF4)
Here is the scenario
Task 1 --Link A --Task 2
Task 1 --LinkB --Task 3
Task2 --LinkC --Task3
When you design your workflow you need to place the workflow links on the canvas in the correct order. LinkA must always have the lowest ObjectId in comparison to Link B and C.
This means that you need to place LinkA on the workflow canvas first, then place linkB and Link C. As long as the LinkA has the lowest ObJectID then the workflow engine will evaluate the links correctly.
Please give this a try and let me know if helps
Regards,
Elena
自己记录一下。