Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create default workflow on installation #16

Open
sminnee opened this issue Oct 2, 2012 · 9 comments
Open

Create default workflow on installation #16

sminnee opened this issue Oct 2, 2012 · 9 comments

Comments

@sminnee
Copy link

sminnee commented Oct 2, 2012

When you install the module, it would be helpful to create a simple 2-step workflow to show how the system works.

The most straightforward way to do this would be a requireDefaultRecords() method that creates the workflow if no workflows exist. That way you could delete the default workflow and it wouldn't come back as long as your had created at least one other workflow.

@sminnee
Copy link
Author

sminnee commented Oct 2, 2012

Note that this should dramatically lower the barrier to entry for the module.

@nyeholt
Copy link
Contributor

nyeholt commented Oct 2, 2012

There's been some thought around developer defined workflow templates - at present my thinking is along the lines of

  • Define a WorkflowTemplate subclass, eg TwoStepTemplate
  • Implement TwoStepTemplate::getCreateFields() which returns a list of fields needed for the initial population of the workflow
  • Implement createWorkflow($data) that creates the relevant actions + transitions, using the information input in the createFields to set up the bits and pieces

The main problem I see with putting together the workflow definition in requireDefaultRecords is that it still requires some additional configuration around assignees - though it may be a quicker solution in the short term.

@sminnee
Copy link
Author

sminnee commented Oct 2, 2012

Aha - you'll see my other comment around assignees. ;-)

@sminnee
Copy link
Author

sminnee commented Oct 2, 2012

The template idea sounds nice, although it doesn't seem critical if #18 was implemented, as it begs the question "what would the parameters be?" I guess the email content could be parameterised.

@nyeholt
Copy link
Contributor

nyeholt commented Nov 9, 2012

There's a start on things at https://github.com/nyeholt/advancedworkflow/tree/workflow_templates

The ideas is that you provide a structure via config for the template, which is then interpreted and converted into steps + actions. See https://github.com/nyeholt/advancedworkflow/blob/workflow_templates/_config/workflows.yml as an example structure for defining a workflow template

I haven't got to changing a template -> updating existing workflows, but it's a reasonably straightforward process; not going to spend any time just yet if this isn't overall approach isn't considered worthwhile pursuing

@nyeholt
Copy link
Contributor

nyeholt commented Nov 20, 2012

Anyone have further input on my previous commit? I'm tweaking things now to add in updates of template versions; we've got a client who's wanting to use this feature so would like to get things merged across if you think it's a reasonable approach for now.

@phptek
Copy link
Contributor

phptek commented Jan 21, 2014

@sminnee @nyeholt can this issue be closed now? There has been a default template for some time now.

@smagnusson
Copy link

The issue here is that there is still some set up to do, from memory the
contents of an email template and the recipients of emails and other such
items still don't work, and for example, could be set up to go to the
default user or some other practical default. This was being looked at in
terms of the NZ Govt Common Web Platform but not sure of when or how it
might be addressed. Could be best to solve it here, upstream, at the source.

So, no, in my opinion, we should not close this just yet.

Sig

@phptek
Copy link
Contributor

phptek commented Jan 22, 2014

OK, thanks for that - good feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

7 participants