How to make window read only while its workflow is running

89 views
Skip to first unread message

iqbal muhammad

unread,
Aug 28, 2017, 1:16:57 AM8/28/17
to iDempiere
Hi Community,

Is there a way to make window read only while its workflow is running?
I thought I can use Processing or Processed field (so I can use it as Read Only logic), but both field shows 'N' while workflow is running.

Thank you for your help.

Regards,
Iqbal

Solutions Ocean.

unread,
Aug 28, 2017, 1:57:38 AM8/28/17
to idem...@googlegroups.com
Use DocStatus != DR



--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/idempiere/b3452197-8e41-406e-b574-2e4777c083a2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Anozi Mada

unread,
Aug 28, 2017, 2:14:18 AM8/28/17
to iDempiere
You can create a workflow node to set the value of column Processing to Y, place it between node DocPrepare and your approval node. Then your window will automatically be read only unless the field is set to always updateable.

Regards,
Anozi Mada

iqbal muhammad

unread,
Aug 28, 2017, 2:34:27 AM8/28/17
to iDempiere
Hi Anozi, 
Thanks for your answer.

But how to handle this requirement, if the approver rejects the workflow, then user still able to edit the window.

Regards,
Iqbal

Anozi Mada

unread,
Aug 28, 2017, 3:33:33 AM8/28/17
to iDempiere
You can use doc action Unlock for that.

iqbal muhammad

unread,
Aug 29, 2017, 5:46:32 AM8/29/17
to iDempiere
Hi Anozi,
Thank you for your direction, I combine it with this.

So here are the steps
1. In my case, it applies to M_Requisition, so instead using dummy SendEmail Boolean column, I add new column, IsApproved1

2. Define node Set Processing
Action: Set Variable:  
Variable: Processing
Column value: Y

3. Define node Set Unprocessing
Action: Set Variable:  
Variable: Processing
Column value: N

4. Define node DocNotApproved
Action: Set Variable:  
Variable: DocStatus
Column value: NA

5. Set (DocPerpare)'s transition to node Set Processing

6. Set DocNotApproved's transition to node Set Unprocessing

7. After that we have to define (2) transitions  from the DocApproval node:
 7.1 from DocApproval to DocComplete, condition:  if the field IsApproved1 = Y (yes)
 7.2 from DocApproval to DocNotApproved, condition:  if that IsApproved1 =  N (NO)

Don't forget to set Read Only Logic to @Processing@=Y to the main tab.

Regards,
Iqbal

Joseph

unread,
Aug 29, 2017, 10:02:54 AM8/29/17
to iDempiere
I think Node attribute should implement a variable as isDocReadonly
and main tab have a implict filter @processing@=Y

Is it a little improvement ?

B.R.
Joseph 
Reply all
Reply to author
Forward
0 new messages