Originally Posted by: "Brad"
Thanks Andy. I'm working to understand the plug-in object model and how the plug-ins get/set data in the database.
Does anyone know if this is documented anywhere?
Thanks.
Like bvuser wrote, it is not documented anywhere but there are several examples. Each type of plug-in is slightly different, but let's say you wanted to write a new product task. Using OverridePriceWithText as an example, you would need to complete the following steps:
<OL>
<LI>Create a new class that inherits from BVSoftware.Bvc5.Core.BusinessRules.ProductTask.
<LI>Override TaskName to return a name for your task when it appears in the list of possible tasks.
<LI>Override TaskId to return a unique ID up to 36 characters long (which is long enough for a GUID).
<LI>Override Execute to peform your task.
<LI>Override Rollback to roll back your task.
<LI>Override Clone to return a new copy of your task.
* Optionally override StepName to return the step name of your task when it appears within a workflow.
</OL>
When your class is contructed the base class will create a new ComponentSettingsManager for you, which you can access using the SettingsManager property of your class. To retrieve a specific setting you would use GetSetting (or GetBooleanSetting, etc). For example, SettingsManager.GetSetting("Step Name").
If you create an editor for your task (see my article "
How to Create a BVC5 Order Workflow Task" for an example of how to create an editor for a task), then you will want to set specific settings using SaveSetting (or SaveBooleanSetting, etc).