11 replies [Last post]
Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Was this information Helpful?

The "next generation" workflow module has been under development as Workflow-ng for Drupal 5.x and is our current module of choice for providing store administrators with web based order workflow configurations. Integration with Workflow-ng means we will be defining different events which can trigger actions assuming any specified conditions have been met. Confusing? Don't let it be. Here's a use case...

Let's say you've set the credit card module to automatically process payment at checkout. When sales come in, you don't always want to have to go manually review the orders to make sure payment was processed fine. A completed checkout has been defined as an event, so you can setup a configuration to process when it occurs. It is possible to update an order's status with this event using the action we've defined, so you can have it automatically move orders to Payment received. Simple enough.

But wait! What if you also let people pay by check? You don't want their orders to move to Payment received right after checkout, because, well, you haven't received the customer's payment. In this case you need to apply some conditions to the configuration. The simplest thing to do will be to check the payment method. You can add a condition that only performs the actions if the payment method is Credit card. This isn't foolproof if you start accepting payment through other methods like PayPal, so why not use a condition that checks the order balance instead? You can set it up so that it only performs the actions if the balance is zero and never think about it again. Smiling

Pretty simple, eh? I'd like to think so, and I'll be working with the module's developer to iron out some kinks in the user interface. For now just use the 1.0 version and you shouldn't have any trouble. I'll let you know when some improvements have been worked into the module.

This thread will be used to track the various integration points of Ubercart with Workflow-ng. Lyle and I will both post comments on here that we will keep updated with the latest events, conditions, and actions we're integrating, and we're open to discussion of these and future ideas in the thread as well. Workflow-ng will make it into the documentation... well, when it makes it. Cool

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: The Big Thread of Workflow-ng Integration
    Events:
  • uc_cart.module - Customer completes checkout
  • uc_order.module - Order status gets updated
  • uc_payment.module - Payment gets entered for an order
    Conditions:
  • uc_order.module - Check the order status
  • uc_order.module - Check an order's delivery postal code
  • uc_order.module - Check an order's delivery zone
  • uc_order.module - Check an order's delivery country
  • uc_payment.module - Check the order balance
  • uc_payment.module - Check the order payment method
    Actions:
  • uc_order.module - Update an order's status
Lyle's picture
Offline
AdministratoreLiTe!
Joined: 08/07/2007
Juice: 6846
Re: The Big Thread of Workflow-ng Integration
    Events:
  • uc_quote.module - Getting shipping quote via [method], for each shipping quote method
    Conditions:
  • uc_quote.module - Order has a product of a particular shipping type
    Actions:
  • uc_quote.module - Fetch a shipping quote
    Configurations:
  • uc_flatrate.module - Shipping quote via flat rate per product
  • uc_flatrate.module - Shipping quote via flat rate per order
  • uc_ups.module - Shipping quote via UPS
  • uc_usps.module - Shipping quote via USPS
  • uc_weightquote.module - Shipping quote via product weight
amitaibu@drupal.org's picture
Offline
Bug Finder
Joined: 09/08/2007
Juice: 239
Re: Re: The Big Thread of Workflow-ng Integration

sweet! Smiling
Just referencing to this, about thoughts of integrating Cart links and CClinks module of workflow-ng

Andy's picture
Offline
Administrator
Joined: 08/07/2007
Juice: 1076
Workflow, CCLinks, and Ubercart

Are you asking why we don't use CClinks for the cart links API? The CClinks module is a nice feature for Workflow-ng, but I don't see what improvements it could offer. As a matter of fact, it seems like it would be more cumbersome. According to the sparse documentation here http://more.zites.net/workflow-ng/cclinks, CClinks is designed to toggle a boolean on or off. The cart links API has many options.
How would cclinks improve on the cart links API?
Peace,
Andy

amitaibu@drupal.org's picture
Offline
Bug Finder
Joined: 09/08/2007
Juice: 239
Re: Workflow, CCLinks, and Ubercart

hmm, I guess your right Andy... The advantage I was thinking about was defining the links actions through a UI.

Andy's picture
Offline
Administrator
Joined: 08/07/2007
Juice: 1076
CCLinks vs. Cart Links API

For this post Cart Links API = CCAPI.

I see your point as well. It would be good to have a nice UI for this. Here is the problem I see. In order to have the flexibility of the CCAPI, with CClinks, you would have to define many different cclinks for each product. Even if you only need one set of options per product, that means you have to generate a cclink for every product, or at least for every product you want to have a "purchase link" for.

Perhaps we could write a simple page to generate a CCAPI url based on the options you select in a form.
I would also be nice to have a default action for CCAPI fields which are not set. This would make the CCAPI links shorter and a little neater.

Would that provide the features you are looking for?
Andy

amitaibu@drupal.org's picture
Offline
Bug Finder
Joined: 09/08/2007
Juice: 239
Re: CCLinks vs. Cart Links API

Actually, it's not a feature I'm currently needing, just thinking of ways to improve Ubercart ... Probably if the feature we'll be there I'll use it Eye-wink

I must admit I didn't fully understand your explanation about the complexity, but from looking at the CCAPI - "Cart links are simple to form using a few actions and arguments with the following rules".

The same as a developer would do it manually, I think it could be nice having it as a UI.

The advantage of CClinks, apart of being connected to the Workflow_ng, is the scheduling (e.g. click this link, and for the next 24 hours you will get a 50% discount...)

Maybe some more ideas are needed, to see if it's required.

cheers,
Amitai

amitaibu@drupal.org's picture
Offline
Bug Finder
Joined: 09/08/2007
Juice: 239
Re: Re: The Big Thread of Workflow-ng Integration

btw, Will Ubercart use the states module which is in the Workflow_ng? I can also see the benefit of changing an order state through this module.

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: Re: Re: The Big Thread of Workflow-ng Integration

I'm not sure what cclinks module you're referring to, and I couldn't find any documentation on the state machine API. Sad Any clue where to find out more info?

amitaibu@drupal.org's picture
Offline
Bug Finder
Joined: 09/08/2007
Juice: 239
Re: Re: Re: Re: The Big Thread of Workflow-ng Integration

About CClinks - https://more.zites.net/workflow-ng/cclinks
About State - Nope, maybe we can ask Fago to give some developer explanation on it...

j0rd's picture
Offline
Getting busy with the Ubercode.
Joined: 07/16/2008
Juice: 453
Content Links. Great module.

Content Links.

Great module. Would allow me to do a lot with out any coding. Since I'm lazy, I like that.

I'm actually redoing a feature in workflow-ng, which I already have coded. It's simpler and more extensible (for my client on his own). I'm running into a wall though.

Let me explain what I'm trying to do, and then I'll explain my issues.

What I'm trying to do
I am trying to create a "Enable this User as a Seller" feature for ubercart marketplace. Upon signup, users can pick either to become a "Regular Member" or "Inactive Seller". The Inactive seller is an "In Moderation" role, with a couple extra permissions, but not enough to add items into the store. Once a moderator approves they account, I switch them over to "Active Seller" role and they can start adding items.

So workflow is great. User signups and has the "Inactive Seller" role, I send an email to my "Store Administrators" and let them know they need to review the account. I send the administrators to the "nodeprofile" user page which has a "Activate This Seller" cclink. Admin clicks it, and a workflow action adds the "Active Seller" role. Sexy.
----

Minor issue
First gripe with CCLinks is that you can't attach them to user pages, only content types. Luckily I have a nodeprofile which is attached with my user. This allows me to get around this limitation.
----

Main issue
My issue is....after seller is in the "Active Seller" role, I can not remove the cclink. I was hoping that if I configured the workflow-ng's attached with the CCLink, so that nothing happens on the click the user is already in the "Active Seller" role, the link would simply disapear. This is not the case. In my opinion it should be removed, because if the cclink exists, but will do nothing when clicked, then what's the point of having it there. This would also allow you to "toggle" CCLinks, like I could have one to activate the user and one to de-active the user. Once one is clicked the other would show up.

Please advise if I can actually do this, but am too stupid to figure it out.

Cheers,
Jordan