Book a Demo

Author Topic: Workflow scripts  (Read 2909 times)

shaunf

  • EA Novice
  • *
  • Posts: 13
  • Karma: +0/-0
    • View Profile
Workflow scripts
« on: March 09, 2011, 08:25:57 pm »
I have created a a script and changed the folder it is in to workflow group.

Code: [Select]
option explicit

!INC Local Scripts.EAConstants-VBScript

'
' Script Name:
' Author:
' Purpose:
' Date:
'
public function AllowStatusUpdate( OldValue, NewValue )
msgbox("boo")
      ' Obtain a reference to the current user and selected item
      dim currentUser, currentItem
      set currentUser = WorkflowUser
      set currentItem = WorkflowContext

    AllowStatusUpdate = true
end function

I have tested this on a local eap file and on a mysql database. The local EAP with no security the repository with security and users enabled. I assume this script should when i change the status of an element or package pop up and say boo? It doesnt on either.

If i make a main method and make that say boo when i reload the project it pops up and says boo.

what am i doing wrong. BTW i can make these broadcasts events work when i put them into an addin but this isnt practical for rolling out to all users. So a script within the repository is the best option.
Thanks in advance