BV Commerce Forum
»
BV Commerce Support
»
General Support
»
Workflows - how do I make and use one? (Developer info needed)
Rank: Member
Joined: 11/15/2006(UTC) Posts: 52
|
Hi,
Is there any documentation, tips, etc, especially for developers, that explains how I make a workflow and utilise it?
I'm particularly interested in creating a product pricing workflow.
Thanks.
|
|
|
|
Rank: Member
Joined: 11/5/2003(UTC) Posts: 1,786
|
Dom, 1) From the admin->Options->Workflows screen select "New Workflow" 2) Add in the steps you'd like to use 3) In your code create a context for the workflow and then run it. Code:
Dim c As New BusinessRules.ProductTaskContext c.UserId = SessionManager.GetCurrentUserId c.Product = Catalog.Product.FindByBvin("abc123")
Dim result as boolean = false result = BusinessRules.Workflow.RunByName(CType(c, BusinessRules.TaskContext), "My Custom Workflow Name")
|
|
|
|
Rank: Member
Joined: 8/17/2006(UTC) Posts: 681
|
Marcus, Small Issue: Talking about workflows, can you guys please make sure in the next release to use Workflows consistently? Right now the code is running different system workflows either by name or by BVIN and this makes it quite hard to understand & modify the code :)
Thanks, Corneliu. |
|
|
|
|
Rank: Member
Joined: 11/5/2003(UTC) Posts: 2,136
Was thanked: 1 time(s) in 1 post(s)
|
Here is a short article I wrote that shows how to create a custom workflow task. http://structured-solutions.net/Coding/BVCommerce5/Bvc5UpdateOrderStatus |
|
|
|
|
Rank: Member
Joined: 11/5/2003(UTC) Posts: 1,786
|
Corneliu,
We use bvin as often as possible because it is faster. When you run a workflow by name we have to make an extra call to resolve the name to a bvin.
|
|
|
|
Rank: Member
Joined: 11/15/2006(UTC) Posts: 52
|
Marcus,
Thanks for your help. And Andy too!
I take that I "plug in" in my product or order task by placing the code in "App_Code" folder? My code there overrides similar classes in the core? I'm just trying to picture and understand the plug in effect.
Thanks.
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.