Sha256: 0f466cb01bcf29c459ea71202e417d632f592dbe6abc09ffb3e243cb4a0ca099

Contents?: true

Size: 1.42 KB

Versions: 19

Compression:

Stored size: 1.42 KB

Contents

# -*- encoding : utf-8 -*-
require 'mdwa/dsl'
MDWA::DSL.workflow.register '<%= @description %>' do |p|
  
  p.alias       = '<%= @process.alias %>'
  
  <%- unless options.no_comments -%>
  # The process start point for every user role
  # Params: :user_role, alias or entity listing
  # p.start_for 'ProjectManager', 'new_project_group'
  # p.start_for 'TeamMember', 'new_task'
  
  # p.detail "Create project group" do |d|

    # Unique alias for detailing
    # Default: Detail name underscored
    # d.alias = 'create_project_group'
    
    # Roles with permission to execute this action
    # Default: all -> no restriction
    # d.user_roles ['ProjectManager']
    
    # Refered action
    # Params: 
    # => :alias
    # => :entity
    # => :action
    # => :method        => :get (default), :post, :put, :delete
    # => :request_type  => :html (default), :ajax, :ajax_js, :modalbox
    # d.action 'project_group', 'create'
    
    # Possible next action
    # Params: 
    # => :alias
    # => :entity
    # => :action
    # => :method
    # => :request
    # => :redirect  => boolean
    # => :render    => boolean
    # => :when - situation when it might occur
    # d.next_action 'new_project_group', :when => 'save failed'
    # d.next_action entity: 'project_group', action: 'index', :redirect => true, :when => 'save ok'
    # d.next_action 'project', 'new', :when => 'clicked save & new project'
        
  # end
  <%- end -%>
  
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
mdd-3.1.4 lib/generators/mdwa/process/templates/process.rb
mdd-3.1.2 lib/generators/mdwa/process/templates/process.rb
mdd-3.1.1 lib/generators/mdwa/process/templates/process.rb
mdd-3.1.0 lib/generators/mdwa/process/templates/process.rb
mdd-3.0.20 lib/generators/mdwa/process/templates/process.rb
mdd-3.0.19 lib/generators/mdwa/process/templates/process.rb
mdd-3.0.18 lib/generators/mdwa/process/templates/process.rb
mdd-3.0.17 lib/generators/mdwa/process/templates/process.rb
mdd-3.0.16 lib/generators/mdwa/process/templates/process.rb
mdd-3.0.15 lib/generators/mdwa/process/templates/process.rb
mdd-3.0.14 lib/generators/mdwa/process/templates/process.rb
mdd-3.0.13 lib/generators/mdwa/process/templates/process.rb
mdd-3.0.10 lib/generators/mdwa/process/templates/process.rb
mdd-3.0.9 lib/generators/mdwa/process/templates/process.rb
mdd-3.0.8 lib/generators/mdwa/process/templates/process.rb
mdd-3.0.7 lib/generators/mdwa/process/templates/process.rb
mdd-3.0.6 lib/generators/mdwa/process/templates/process.rb
mdd-3.0.4 lib/generators/mdwa/process/templates/process.rb
mdd-3.0.3 lib/generators/mdwa/process/templates/process.rb