Full Version: Where does the function 'getSalesEntityType' come from?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I was studying this example from the documentation, and noticed this function called 'getSalesEntityType' that checks the entitytype on the id pulled in from the 'data' object. Since no files were included in this function file, I can't see how where this function comes from, although I can understand what it does from the name, I'd rather have a better understanding so I know what I'm doing when writing my own workflow methods. Can anyone explain?

the corebos updater class is executed inside a controlled environment where all the possibly required functionality is already loaded for you. That way you can concentrate on doing the change.
Hey Joe,

Thanks. I don't understand the second part quite yet. I understand the initial setup and adding of the task to the system is done inside the
file, that creates a Class that extends 'cbupdaterWorker'. That file basically registers
into the database, but this file doesn't define or extend a class, so how can it work inside of a corebos updater class? Or can any function, even though in a separate file be considered an extention of the corebos updater class when it was added via the corebos updater class?
Sorry: the changeset works inside coreBOS updater. The updateContactAssignedTo.php is executed by the workflow system which loads all the necessary stuff itself.

In general you can count on having all these functions. If you load vtlib/Module.php it will load (almost) everything you need.
Ah that was my understanding, yes. It's just that I didn't see any includes in the file. But I can assume that when inside workflow tasks, the workflow system has already included many functions. Come to think of it, I was looking at this as if the function were the starting point. I should look at it more as if the function file is the inclusion (before which many other inclusions may have been made).
yes, that is more or less the things: both corebos updater and workflow try to make it as easy as possible for you to just do what you need to do and count on having the basics in place