While creating workflows one has to ensure that device group, post staging template and deviceworkflow all shall belong to same organization. From 22.x onwards code level checks are in place to ensure the same. 

However, prior to that, (in 21.x.x), as there were no such checks in the code, users are able to configure the deviceworkflow and device group in sub org but the post staging template in parent org.  

A head end which is deployed in this way, after upgrading to 22.x.x, workflow redeploy or commit template to the device will end up with the error 

"Post Staging Template  [ xxxpoststagingtemplatexxx ] does not belong to org xxorgxx please update the post staging template in device group or assign a new device group to the device workflow".


From UI it is not possible to edit the org name for the device group and resolve this error. 


This article helps to recover such a headend which has errors while re-deploy or committing the template. 


  • vsh stop on the standby VD node (when VD is in HA mode)
  • Primary VD:

sudo vi /var/versa/vnms/data/conf/vnms.properties

ALLOW_DEVICEWORKFLOW_ORG_CHANGE=true         

vsh restart


admin@VD-Bionic-1:~$ psql -U vnms -d vnms -h localhost

vnms=# select from deviceworkflow where device_group ='DG_XXXX';     /* identify no.of devices associated with this device group*/

vnms=# update device_group set organization = 'XXX' where name ='DG_XXXX';  /*changing the orgname of the device group*/


vnms=# update deviceworkflow set orgname = 'XXX' where name in (select name from deviceworkflow where device_group = 'DG_XXXX');   /*For all the devices that belong to a device group changing the org*/




  • Verify for one of the device groups, redeploy workflow, commit template, ensure everything is fine
  • Then proceed for rest of the device groups
  • Delete the line ALLOW_DEVICEWORKFLOW_ORG_CHANGE=true after the activity
  • vsh restart
  • Logout/login from the VD UI


Once the primary VD is intact and confirmed that the error is not seen any more while committing the template or redeploying the deviceworkflow:

  • Start the services on secondary