Possible bugs within the workflow engine (node transition conditions are ignored during runtime) of Idempiere ?

479 views
Skip to first unread message

Pedro Rozo

unread,
Feb 11, 2014, 10:55:11 AM2/11/14
to idem...@googlegroups.com
Hi everyone

We have spent a couple of days trying to replicate a simple approval workflow that used to work in Adempiere 3.6.1 with regular purchase orders. We just inserted an approval node for purchase orders (total line > 1000)  using Idempiere 1.0c and 2.0 workflow windows and editor,, but the approval steps and condition seems to be ignored at runtime and the process just finish without any suspension as required.

Please notice:

1. We have simplified the test case to the minimum functionality to show you the details with the GardenWorld environment,
2. We have already replicated the test case in the https://demo.idempiere.com/webui/index.zul  environment so you can take a look and compare with the process_requistion template (for us they have the same info)  
3. We have used the the same user: GardenAdmin during all the worflow process definition and customization, so the notification, user and role approval fields have been tested with the demo workflow (process_requisition)
4. Following Carlos' suggestions included on previous threads of this forum, we have already analized the process requisition (workflow) available in GardenWorld and that works. (condition, notification and approval workflow)
5. We have already implemented the same functionality on Adempiere 3.6.1 before without these weird issues, 
6. We already double checked the suggestions/checklist from the available books of adempiere 3.4 and compiere, 

However, our new process tested with the process_order (available for your review in the https://demo.idempiere.com/webui/index.zul environment)

where we just created:

   - a new node: order approval  
         action: User Choice
         column: IsApproved_Approved
             
   - a new node transition from the doc_prepare  to the new order_approval with a condition:  TotalLines_Total Lines > 100 

   - new node transtion from order_approval to doc_complete

When we tried to test it (creating a new purchase order) there is no approval process, and the order is just completed (workflow ignored)


During the workflow modeling we saw some weird behaviurs/potential bugs: 

1. The workflow editor doesn´t show our node transition condition (TotalLines_Total Lines > 100) within the process_order, but with the process_request (demo) we can see it . It looks is ignoring the new conditions perhaps ?

2. Once the condition for a node transition is defined,, and you close the windows and tabs, and you want to edit it again, it is not possible, and we just got a error message: Please select the parent tab fist (no way to edit), you just have to remove it and create it again..


Our preliminary observations:

- The workflow engine is ignoring new conditions created with idempiere (created manually or with the workflow editor they are ignored during the runtime), though the demo works, perhaps because is old data was migrated manually, but any new workflow  with a new basic approval processed like this are not working on runtime.

We tested these scenarios first in our local Idempiere (1.0c) and we also replicated the same behavour with the demo environment (Idempiere 2.0 I guess) 

Any suggestions, are we missing something else ? 

is it really a bug report it in Jira ... ?  

Regards

Pedro Rozo
   

Alan Lescano

unread,
Feb 11, 2014, 11:13:16 AM2/11/14
to idem...@googlegroups.com
Pedro, I created an order on demo (50000) and it worked correctly.
Remender you should try to complete the order with GardenUser role, because this role has an low aproval amount on role window. GardenAdmin, in demo, can aprrove values above 100,00

Alan


--
You received this message because you are subscribed to the Google Groups "iDempiere" group.
To unsubscribe from this group and stop receiving emails from it, send an email to idempiere+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/idempiere/0d2d844c-4313-4288-955a-30ddfc99fb86%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Pedro Rozo

unread,
Feb 11, 2014, 11:30:26 AM2/11/14
to idem...@googlegroups.com
Thanks for yoru quick reply Alan. 

I would appreciate if you can elaborate a bit more your results, because we have spent a lot of time preparing these test cases:

1. "worked correctly means for you": did you get a notification for approval, and later on you approved ?     which user, steps ...   for us the order just finish complete and not approval process is triggered.

2. did you change our workflow definition for the process_order, ?

3. why we can not complete the purchase order with the GardenAdmin only ? similar to the requisitions ? with the requisitions (using only the GardenAdmin) we got the notification for approval, and so on .. and we are using the same approve values and conditions for both workflow.s.

Regards

Pedro

Rahim Mohd Said

unread,
Feb 11, 2014, 11:34:10 AM2/11/14
to idem...@googlegroups.com
Dear Pedro,

I had the same problem when I did a similar exercise using the examples shown in Bayu Pangmungkas book (Adempiere 3.4) pages 306 - 315) under Idempiere 1.0.  I did use the user role (i.e. Sistematika User) and it still did not work.

Alan Lescano

unread,
Feb 11, 2014, 11:51:09 AM2/11/14
to idem...@googlegroups.com
2014-02-11 14:30 GMT-02:00 Pedro Rozo <pedro...@gmail.com>:
Thanks for yoru quick reply Alan. 

I would appreciate if you can elaborate a bit more your results, because we have spent a lot of time preparing these test cases:

1. "worked correctly means for you": did you get a notification for approval, and later on you approved ?     which user, steps ...   for us the order just finish complete and not approval process is triggered.
 
I've created an sales order with GardenUser role, total lines 150,00 and tryed to complete. It stayed In Progress. I logout and login with GardenAdmin role and I had a new Workflow Activity. After approved, the order was finally completed. You can view order change log.

2. did you change our workflow definition for the process_order, ?

No, I just reviewed.
 

3. why we can not complete the purchase order with the GardenAdmin only ? similar to the requisitions ? with the requisitions (using only the GardenAdmin) we got the notification for approval, and so on .. and we are using the same approve values and conditions for both workflow.s.

On role window, you can configure if users can approve own documents, and set maximum approval amount. For demo purposes, GardenAdmin can approve own documents and a value up to 10,000,000.00. GardenUser can't approve own documents, and amounts up to 30.00. Of course, you can change this in your implementations or newly created roles.
 

Pedro Rozo

unread,
Feb 11, 2014, 4:40:53 PM2/11/14
to idem...@googlegroups.com
Alan 


With your suggestions we found that  orders and requisitions are working now (document generated by GardenUser and approved by GardenAdmin), however our real use case using shipments doesn´t work.  Then we just replicated a similar node, and transition config  for the Process_Shipment (similar to the previos process_order), and we performed similar tests within the https://demo.idempiere.com/webui/index.zul, but it didn´t work neither.:

Our summary of steps for testing:

1. GardenUser create a sales order of any valid product with (quantity on hand available), completed (approved by GardenAdmin)   works ok. 
2. GardenUser create a shipment (customer) based on the previous sales order; and here again the final status should be suspended (as it was with the previous order)  but in this case no approval logic was performed, the shipment is completed without any approval at all.,

Our thoughts to validate:

1. Having in mind the shipment doesn´t manage any total (amount to approve), perhaps we need to add and specific condition, so the transition from prepare to approval is filtered properly .... ?  we already tried definid a filter by document number, but it didn´t work
2. is there any other different consideration to have in mind to insert this approval node for this Process_Shipment, having in mind that doesnñt manage amount (prices and so on), just quantities.
3. is the Process_Shipment the rigth workflow process for the Shipment (Customer) documents ?

Let us know your ideas .. we are trying to document all our results to generate a short summary and perhaps common mistakes  later for everyone so your feedback is appreciated.

Regards,


Pedro R

Alan Lescano

unread,
Feb 12, 2014, 11:18:50 AM2/12/14
to idem...@googlegroups.com
Pedro, configuring workflows can be really complex sometimes. You can't find many examples on web to learn from, except order amount approval.
You are right, you should use columns in m_inout table to config your approval in Process_Shipment. I recommend try to read code, trial and error tests, and more specific questions to community.

Maybe this link can show you some more complex case to use workflow, including setting IsApproval variable: 


Alan


Myles Donnelly

unread,
Aug 18, 2017, 8:57:45 AM8/18/17
to iDempiere
Hi All,

I am having an issue with adding in an email node to just send an email. The transition splits to approval and email. The workflow activity on the pricelist creation I am using says email completed successfully however it isn't actually emailing the workflow responsible. I have attached the setup. I have done this setup on a process journal approval and it works. Now using a custom workflow for creating a pricelist it doesn't work.

Any assistance is greatly appreciated

Kind Regards
Myles Donnelly
Email node setup.docx
Reply all
Reply to author
Forward
0 new messages