Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Where does the function 'getSalesEntityType' come from?
#1
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?
Reply
#2
include/utils/CommonUtils.php
https://github.com/tsolucio/corebos/blob...s.php#L470


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.
Joe
TSolucio
Reply
#3
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
Code:
build/changeSets/workflow_contactassignedto.php
file, that creates a Class that extends 'cbupdaterWorker'. That file basically registers
Code:
include/wfMethods/updateContactAssignedTo.php
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?
Reply
#4
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.
Joe
TSolucio
Reply
#5
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).
Reply
#6
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
Joe
TSolucio
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)