| Class | Workflow |
| In: |
app/models/workflow.rb
|
| Parent: | ActiveRecord::Base |
| Original by: | Sysphonic |
| Authors: | MORITA Shintaro |
| Copyright: | Copyright (c) 2007 MORITA Shintaro, Sysphonic. All rights reserved. |
| License: | New BSD License (See LICENSE file) |
| URL: | http://sysphonic.com/ |
Workflow is related to Item whose xtype attribute is XTYPE_WORKFLOW, and has information of its status and users to require confirmation.
*
| STATUS_NOT_APPLIED | = | 'N/A' |
| STATUS_NOT_ISSUED | = | 'not_issued' |
| STATUS_ACTIVE | = | 'active' |
| STATUS_ACCEPTED | = | 'accepted' |
| STATUS_DENIED | = | 'denied' |
| STATUS_NAMES | = | { STATUS_NOT_APPLIED => _('N/A'), STATUS_NOT_ISSUED => _('Not Issued'), STATUS_ACTIVE => _('Active'), STATUS_ACCEPTED => _('Accepted'), STATUS_DENIED => _('Denied'), } |
s Gets list of received Workflows expected to handle currently.
| user_id: | Target User-ID. |
| return: | List of Workflows. |
Gets list of received Workflows of specified User.
| user_id: | Target User-ID. |
| order_by: | Order. ex. ‘id ASC‘ |
| return: | List of received Workflows. |
Gets current response-expected Users.
| return: | Array of current response-expected User-IDs. If denied or not issued, returns nil. If accepted returns empty array. |
Gets order index to which specified User belongs.
| user_id: | Target User-ID. |
| return: | Order index to which specified User belongs. If not found, returns -1. |
Gets String which represents status of the Workflow.
| return: | String which represents status of the Workflow. |
Gets all target Users of this Workflow.
| return: | Array of User-ID of the target Users. |