Jump to content

Multiple steps (with feedback) in a workflow


Recommended Posts

Hello all,

I'm looking to write a workflow for a project management system I use. The system has projects. Projects have tasks and milestones. Tasks have subtasks. They have a REST api I've used several times before through both PHP and Python.

 

I'd like to use the feedback mechanisms to let the user start typing a project, and auto-populate as they type. The thing is, I want them to do more things with that project after they've selected it.


Here's the flow I'm imagining:

  1. User starts typing "foo My Pro" and they see some project appear: "My Project 1" and "My Product Launch"
  2. User chooses "My Project 1"
  3. User hits spacebar
  4. User starts typing "Add a " and options appear for "Add a task" and "Add a Milestone".
  5. User chooses "Add a task"
  6. User hits spacebar
  7. User types a task name and hits enter
  8. Task submits to the chosen project.

Is all of this possible with the new v2 workflows? If you tell me it is possible, I'll move forward to try and make it happen... excitedly. :)

 

Thanks!

-Adam

Link to comment

Hello all,

I'm looking to write a workflow for a project management system I use. The system has projects. Projects have tasks and milestones. Tasks have subtasks. They have a REST api I've used several times before through both PHP and Python.

 

I'd like to use the feedback mechanisms to let the user start typing a project, and auto-populate as they type. The thing is, I want them to do more things with that project after they've selected it.

Here's the flow I'm imagining:

  • User starts typing "foo My Pro" and they see some project appear: "My Project 1" and "My Product Launch"
  • User chooses "My Project 1"
  • User hits spacebar
  • User starts typing "Add a " and options appear for "Add a task" and "Add a Milestone".
  • User chooses "Add a task"
  • User hits spacebar
  • User types a task name and hits enter
  • Task submits to the chosen project.
Is all of this possible with the new v2 workflows? If you tell me it is possible, I'll move forward to try and make it happen... excitedly. :)

 

Thanks!

-Adam

I believe it is; script filters support autocomplete, which should allow this kind of interaction. :)

Link to comment

Hello all,

I'm looking to write a workflow for a project management system I use. The system has projects. Projects have tasks and milestones. Tasks have subtasks. They have a REST api I've used several times before through both PHP and Python.

 

I'd like to use the feedback mechanisms to let the user start typing a project, and auto-populate as they type. The thing is, I want them to do more things with that project after they've selected it.

Here's the flow I'm imagining:

  1. User starts typing "foo My Pro" and they see some project appear: "My Project 1" and "My Product Launch"
  2. User chooses "My Project 1"
  3. User hits spacebar
  4. User starts typing "Add a " and options appear for "Add a task" and "Add a Milestone".
  5. User chooses "Add a task"
  6. User hits spacebar
  7. User types a task name and hits enter
  8. Task submits to the chosen project.

Is all of this possible with the new v2 workflows? If you tell me it is possible, I'll move forward to try and make it happen... excitedly. :)

 

Thanks!

-Adam

 

It's possible, but it's a bit of a hack. People are simulating this with text markers. So:

 

1. foo My Pro -> script filter sees this is a project lookup and outputs a list of projects. Each project auto-completes, like: 'My Project 1 > '.

4. foo My Project 1 > Add a -> script filter sees the embedded '>' and provides a list of tasks that match 'Add a'. Each entry auto-completes, like 'My Project 1 > Add a task > '.

7. foo My Project 1 > Add a task > my new task -> script filter sees two embedded '>'s and uses the task name to add a task to project 1.

 

You can use anything as the separator, there's a unicode character that looks similar to '>' but isn't the same character. The rest is just text processing to strip out the text between the markers.

 

If you mark an entry as 'valid="no"' then it can only cause an auto-complete and won't trigger anything else. 

Link to comment

I believe it is; script filters support autocomplete, which should allow this kind of interaction. :)

 

 

Hello all,

I'm looking to write a workflow for a project management system I use. The system has projects. Projects have tasks and milestones. Tasks have subtasks. They have a REST api I've used several times before through both PHP and Python.

 

I'd like to use the feedback mechanisms to let the user start typing a project, and auto-populate as they type. The thing is, I want them to do more things with that project after they've selected it.

Here's the flow I'm imagining:

  1. User starts typing "foo My Pro" and they see some project appear: "My Project 1" and "My Product Launch"
  2. User chooses "My Project 1"
  3. User hits spacebar
  4. User starts typing "Add a " and options appear for "Add a task" and "Add a Milestone".
  5. User chooses "Add a task"
  6. User hits spacebar
  7. User types a task name and hits enter
  8. Task submits to the chosen project.

Is all of this possible with the new v2 workflows? If you tell me it is possible, I'll move forward to try and make it happen... excitedly. :)

 

Thanks!

-Adam

 

The only downside to autocomplete though is that you end up with a huge string where have to go back and parse out the project name and what task they want to do, OR you have to maintain some kind of context. So as they autocomplete, it saves data from the previous step, wipes the input box, changes the xml output, and continues on.

 

Both are possible. Neither are extremely hard. Another alternative would be to have multiple steps in the workflow. Not saying this way is better, its all to your choosing, just mentioning it as "another way". This way involves kind of maintaining a context as well. For instance, you could have a.. keyword (script filter): add, that gives options to task or milestone. The output of this part would use Applescript to repopulate Alfred with 'project: ' which would be the keyword for a script filter to search for which project you want to add it to. That would be saved, then repopulate Alfred with 'task: ' and then you fill in the task. Pressing enter there would submit it to the site.

Link to comment

It's possible, but it's a bit of a hack. People are simulating this with text markers. So:

 

1. foo My Pro -> script filter sees this is a project lookup and outputs a list of projects. Each project auto-completes, like: 'My Project 1 > '.

4. foo My Project 1 > Add a -> script filter sees the embedded '>' and provides a list of tasks that match 'Add a'. Each entry auto-completes, like 'My Project 1 > Add a task > '.

7. foo My Project 1 > Add a task > my new task -> script filter sees two embedded '>'s and uses the task name to add a task to project 1.

 

You can use anything as the separator, there's a unicode character that looks similar to '>' but isn't the same character. The rest is just text processing to strip out the text between the markers.

 

If you mark an entry as 'valid="no"' then it can only cause an auto-complete and won't trigger anything else. 

 

The text markers is a good idea as well. Thanks for mentioning this Ted.

Link to comment

Ahh! Great feedback so far. I'm at work now but will look into this in a bit...

Thank you!

 

I'm going to try to get together a few example workflows of how to do this so I can share them to some of the users. Some of this is kinda hard to wrap your head around just describing it. I'll more than likely post them on the somewhere here and make it sticky so its easy to find.

Link to comment
  • 2 weeks later...

I'm going to try to get together a few example workflows of how to do this so I can share them to some of the users. Some of this is kinda hard to wrap your head around just describing it. I'll more than likely post them on the somewhere here and make it sticky so its easy to find.

 

I'm trying to accomplish nearly the same thing and not sure where to go from what I'm at. I would love to see an example - an example of all methods to accomplish this would be nice.

 

EDIT - Looks like I found it: http://www.alfredforum.com/topic/1283-how-to-script-filters-reusing-a-single-script-filter-or-chaining-multiple-together/

Edited by robotic
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...