Difference between revisions of "API:EPrints/Workflow"

From EPrints Documentation
Jump to: navigation, search
(New page: <!-- Pod2Wiki=_preamble_ This page has been automatically generated from the EPrints source. Any wiki changes made between the 'Pod2Wiki=*' and 'End of Pod2Wiki' comments will be lost. -...)
 
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
<!-- Pod2Wiki=_preamble_  
 
<!-- Pod2Wiki=_preamble_  
This page has been automatically generated from the EPrints source. Any wiki changes made between the 'Pod2Wiki=*' and 'End of Pod2Wiki' comments will be lost.
+
This page has been automatically generated from the EPrints 3.2 source. Any wiki changes made between the 'Pod2Wiki=*' and 'Edit below this comment' comments will be lost.
  -->{{Pod2Wiki}}{{API:Source|file=EPrints/Workflow.pm|package_name=EPrints::Workflow}}[[Category:API|Workflow]]<!-- End of Pod2Wiki -->
+
  -->{{API}}{{Pod2Wiki}}{{API:Source|file=perl_lib/EPrints/Workflow.pm|package_name=EPrints::Workflow}}[[Category:API|WORKFLOW]][[Category:API:EPrints/Workflow|WORKFLOW]]<div><!-- Edit below this comment -->
<!-- Pod2Wiki=head_name -->=NAME=
+
 
 +
 
 +
<!-- Pod2Wiki=_private_ --><!-- Pod2Wiki=head_name -->
 +
==NAME==
 
'''EPrints::Workflow''' - Models the submission process used by an repository.  
 
'''EPrints::Workflow''' - Models the submission process used by an repository.  
  
<!-- End of Pod2Wiki -->
+
<!-- Edit below this comment -->
<!-- Pod2Wiki=head_description -->=DESCRIPTION=
+
 
 +
 
 +
<!-- Pod2Wiki= -->
 +
<!-- Pod2Wiki=head_description -->
 +
==DESCRIPTION==
 
The workflow class handles loading the workflow configuration for a  single repository.  
 
The workflow class handles loading the workflow configuration for a  single repository.  
  
<!-- End of Pod2Wiki -->
+
<!-- Edit below this comment -->
<!-- Pod2Wiki=item_new -->==new==
+
 
 +
 
 +
<!-- Pod2Wiki= -->
 +
<!-- Pod2Wiki=head_workflow_format -->
 +
==WORKFLOW FORMAT==
 +
* component
 +
: Parents: [[API:EPrints/Workflow#stage|stage]]
 +
 
 +
: Children: [[API:EPrints/Workflow#field|field]]
  
  $language = EPrints::Workflow-&gt;new( $session, $workflow_id, %params )
+
: Attributes: type
  
Create a new workflow object representing the specification given in the workflow.xml configuration
+
<pre>  &lt;component type="Field::Multi"&gt;
 +
    &lt;field ref="title" /&gt;
 +
    &lt;field ref="abstract" /&gt;
 +
  &lt;/component&gt;</pre>
 +
 
 +
* field
 +
: Parents: [[API:EPrints/Workflow#component|component]]
 +
 
 +
: Children: [[API:EPrints/Workflow#sub_field|sub_field]]
 +
 
 +
: Attributes: ref
 +
 
 +
<pre>  &lt;field ref="title" input_cols="40" /&gt;</pre>
 +
 
 +
: <code>field</code> includes a metafield in the workflow. Any property can be set for the field by supplying it as an attribute.
 +
 
 +
* flow
 +
: Parents: [[API:EPrints/Workflow#workflow|workflow]]
 +
 
 +
: Children: [[API:EPrints/Workflow#stage|stage]]
 +
 
 +
<pre>  &lt;flow&gt;
 +
    &lt;stage ref="files" /&gt;
 +
    &lt;stage ref="details" /&gt;
 +
  &lt;/flow&gt;</pre>
 +
 
 +
* stage
 +
: Parents: [[API:EPrints/Workflow#workflow|workflow]], [[API:EPrints/Workflow#flow|flow]]
 +
 
 +
: Children: [[API:EPrints/Workflow#component|component]]
 +
 
 +
: Attributes: ref, name
 +
 
 +
<pre>  &lt;stage name="details"&gt;
 +
    &lt;component&gt;&lt;field ref="title"/&gt;&lt;/component&gt;
 +
  &lt;/stage&gt;</pre>
 +
 
 +
* sub_field
 +
: Parents: [[API:EPrints/Workflow#field|field]]
 +
 
 +
: <code>sub_field</code> allows properties to be set for sub-fields of [[API:EPrints/MetaField/Compound|EPrints::MetaField::Compound]] and sub-classed field types.
 +
 
 +
: See [[API:EPrints/Workflow#field|field]] for possible attributes.
 +
 
 +
* workflow
 +
: Children: [[API:EPrints/Workflow#flow|flow]], [[API:EPrints/Workflow#stage|stage]]
 +
 
 +
<pre>  &lt;workflow xmlns="http://eprints.org/ep3/workflow"&gt;
 +
    &lt;flow&gt;
 +
      ...
 +
    &lt;/flow&gt;
 +
    &lt;stage name="files"&gt;
 +
      ...
 +
    &lt;/stage&gt;
 +
    &lt;stage name="details"&gt;
 +
      ...
 +
    &lt;/stage&gt;
 +
  &lt;/workflow&gt;</pre>
 +
 
 +
<!-- Edit below this comment -->
  
# needs more config - about object etc.
 
  
<!-- End of Pod2Wiki -->
+
<!-- Pod2Wiki= -->
<!-- Pod2Wiki=head_undocumented_methods -->=UNDOCUMENTED METHODS=
+
<!-- Pod2Wiki=head_methods -->
{{API:Undocumented Methods}}<!-- End of Pod2Wiki -->
+
==METHODS==
<!-- Pod2Wiki=item_description -->==description==
+
<!-- Pod2Wiki=head_new -->
 +
===new===
  
<!-- End of Pod2Wiki -->
+
<source lang="perl">$language = EPrints::Workflow->new( $session, $workflow_id, %params )
<!-- Pod2Wiki=item_get_first_stage_id -->==get_first_stage_id==
 
  
<!-- End of Pod2Wiki -->
+
</source>
<!-- Pod2Wiki=item_get_last_stage_id -->==get_last_stage_id==
+
Create a new workflow object representing the specification given in the workflow.xml configuration
  
<!-- End of Pod2Wiki -->
+
# needs more config - about object etc.
<!-- Pod2Wiki=item_get_next_stage_id -->==get_next_stage_id==
 
  
<!-- End of Pod2Wiki -->
+
<!-- Edit below this comment -->
<!-- Pod2Wiki=item_get_prev_stage_id -->==get_prev_stage_id==
 
  
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=item_get_stage -->==get_stage==
 
  
<!-- End of Pod2Wiki -->
+
<!-- Pod2Wiki= -->
<!-- Pod2Wiki=item_get_stage_id -->==get_stage_id==
+
<!-- Pod2Wiki=head_add_workflow_flow -->
 +
===add_workflow_flow===
  
<!-- End of Pod2Wiki -->
+
<source lang="perl">$repository->add_workflow_flow( $workflowid, $id, $types, $stages )
<!-- Pod2Wiki=item_get_stage_ids -->==get_stage_ids==
 
  
<!-- End of Pod2Wiki -->
+
</source>
<!-- Pod2Wiki=item_get_state_params -->==get_state_params==
+
Add a flow to the workflow which is applicable for the types in types and contains the stages in stages.
  
<!-- End of Pod2Wiki -->
+
The $id is used to remove everything relating to this is from the workflow.
<!-- Pod2Wiki=item_get_workflow_config -->==get_workflow_config==
 
  
<!-- End of Pod2Wiki -->
+
<!-- Edit below this comment -->
<!-- Pod2Wiki=item_link_problem_xhtml -->==link_problem_xhtml==
 
  
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=item_load_all -->==load_all==
 
  
<!-- End of Pod2Wiki -->
+
<!-- Pod2Wiki= -->
<!-- Pod2Wiki=item_load_workflow_file -->==load_workflow_file==
+
<!-- Pod2Wiki=head_copyright -->
 +
==COPYRIGHT==
 +
Copyright 2000-2011 University of Southampton.
  
<!-- End of Pod2Wiki -->
+
This file is part of EPrints http://www.eprints.org/.
<!-- Pod2Wiki=item_next -->==next==
 
  
<!-- End of Pod2Wiki -->
+
EPrints is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
<!-- Pod2Wiki=item_prev -->==prev==
 
  
<!-- End of Pod2Wiki -->
+
EPrints is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
<!-- Pod2Wiki=item_render -->==render==
 
  
<!-- End of Pod2Wiki -->
+
You should have received a copy of the GNU Lesser General Public License along with EPrints.  If not, see http://www.gnu.org/licenses/.
<!-- Pod2Wiki=item_set_stage -->==set_stage==
 
  
<!-- End of Pod2Wiki -->
+
<!-- Edit below this comment -->
<!-- Pod2Wiki=item_update_from_form -->==update_from_form==
 
  
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=item_validate -->==validate==
 
  
<!-- End of Pod2Wiki -->
+
<!-- Pod2Wiki= -->
<!-- Pod2Wiki=_postamble_ --><!-- End of Pod2Wiki -->
+
<!-- Pod2Wiki=_postamble_ -->
 +
<!-- Edit below this comment -->

Latest revision as of 09:56, 22 January 2013

EPrints 3 Reference: Directory Structure - Metadata Fields - Repository Configuration - XML Config Files - XML Export Format - EPrints data structure - Core API - Data Objects


API: Core API

Latest Source Code (3.4, 3.3) | Revision Log | Before editing this page please read Pod2Wiki


NAME

EPrints::Workflow - Models the submission process used by an repository.


DESCRIPTION

The workflow class handles loading the workflow configuration for a single repository.


WORKFLOW FORMAT

  • component
Parents: stage
Children: field
Attributes: type
  <component type="Field::Multi">
    <field ref="title" />
    <field ref="abstract" />
  </component>
  • field
Parents: component
Children: sub_field
Attributes: ref
  <field ref="title" input_cols="40" />
field includes a metafield in the workflow. Any property can be set for the field by supplying it as an attribute.
  • flow
Parents: workflow
Children: stage
  <flow>
    <stage ref="files" />
    <stage ref="details" />
  </flow>
  • stage
Parents: workflow, flow
Children: component
Attributes: ref, name
  <stage name="details">
    <component><field ref="title"/></component>
  </stage>
  • sub_field
Parents: field
sub_field allows properties to be set for sub-fields of EPrints::MetaField::Compound and sub-classed field types.
See field for possible attributes.
  • workflow
Children: flow, stage
  <workflow xmlns="http://eprints.org/ep3/workflow">
    <flow>
      ...
    </flow>
    <stage name="files">
      ...
    </stage>
    <stage name="details">
      ...
    </stage>
  </workflow>


METHODS

new

$language = EPrints::Workflow->new( $session, $workflow_id, %params )

Create a new workflow object representing the specification given in the workflow.xml configuration

  1. needs more config - about object etc.


add_workflow_flow

$repository->add_workflow_flow( $workflowid, $id, $types, $stages )

Add a flow to the workflow which is applicable for the types in types and contains the stages in stages.

The $id is used to remove everything relating to this is from the workflow.


COPYRIGHT

Copyright 2000-2011 University of Southampton.

This file is part of EPrints http://www.eprints.org/.

EPrints is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

EPrints is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with EPrints. If not, see http://www.gnu.org/licenses/.