Document Value Workflow on System level doesn't run on other clients

Description

1. Setup Document Value workflow in client System and select access level Client+Organisation
2. Login As GardenAdmin and run Role Access Update (this will add access to created workflow for GardenAdmin role)

Workflow will never start for GardenAdmin. Cache reset and clear browser data didn't help. I had to move workflow to Garden World client to get it work.

I think that bug could be in MWorkflow.getDocValue where worklfows are read from CCache. There is a cache key like "C" + AD_Client_ID + "T" + AD_Table_ID, but cache has workflow stored with client ID of system while trying to find by garden world client ID.

Environment

None

Activity

Show:
Tomáš Švikruha
November 10, 2014, 9:56 PM

After applying this patch, document value workflows from client&system are executed (before only client workflows was executed). Tested, works on development environment.

Carlos Ruiz
November 12, 2014, 2:35 PM

, I think that was done by design from JJ times and maybe that's the reason for the process "Workflow to Client".

The issue I see is that changing the approach you cannot have a workflow that JUST applies for System, any System workflow will apply to all clients.

Tomáš Švikruha
November 12, 2014, 4:26 PM

Document Process workflows supports this approch (when system workflow can be executed in client, thats the reason why there is a field Data Access Level) e.g. "Process_Order". But Document Value workflow is working only when it ist set on specific Client. So use case when Document Value WF is set on System, and executed on other Clients doesnt work. Now user has to set same workflow on each client separately (only Document Value WF). This is the reason why I think this limitation is a bug. Field Data Access level is confusing for Document Value WF.

"Workflow to Client" can only move some WF from System to other Client (it should rather copy than move). So this is not helpfull in use case when I want so set some Document value WF on many clients. Lets imagine that I have 3 clients in iDempiere on which I have to setup some Doc.Value WF. Do I have to setup it separately for each client and maintain it separately? Its useless to do it.

My opinion is that when I set some workflow on System with data access level for example Client+Organization, then this will be executed on all clients. So why it is possible for Document Process WF but for Document Value WF not?

Pritesh Shah
August 30, 2017, 10:19 PM

Even in document process workflow, if we add condition to any transition in a client, it gets applied to all clients. For example, process_order is a system level document process workflow, if we add condition in its prepare node->transition (complete) in say x client and if we execute or complete SO in client y condition is applied. Reason is getConditions method in MWFNodeNext.java fetches all conditions irrespective of client.

This means we cannot add any modification pertaining to one client

Assignee

Unassigned

Reporter

Tomáš Švikruha

Labels

None

Tested By

None

Components

Priority

Major
Configure