⧼vector-jumptocontent⧽

API:EPrints/Workflow: Difference between revisions

From EPrints Documentation
No edit summary
No edit summary
 
(4 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 3.2 source. Any wiki changes made between the 'Pod2Wiki=*' and 'Edit below this comment' 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.
  -->{{API}}{{Pod2Wiki}}{{API:Source|file=EPrints/Workflow.pm|package_name=EPrints::Workflow}}[[Category:API|WORKFLOW]][[Category:API:EPrints/Workflow|WORKFLOW]]<div><!-- Edit below this comment -->
  -->{{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 -->




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


<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
<span style='display:none'>User Comments</span>
<!-- Edit below this comment -->
<!-- Edit below this comment -->




<!-- Pod2Wiki= -->
<!-- Pod2Wiki= -->
</div>
<!-- Pod2Wiki=head_description -->
<!-- Pod2Wiki=head_description -->
==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.  


<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
<span style='display:none'>User Comments</span>
<!-- Edit below this comment -->
<!-- Edit below this comment -->




<!-- Pod2Wiki= -->
<!-- Pod2Wiki= -->
</div>
<!-- Pod2Wiki=head_workflow_format -->
<!-- Pod2Wiki=head_workflow_format -->
==WORKFLOW FORMAT==
==WORKFLOW FORMAT==
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
* component
<span style='display:none'>User Comments</span>
: Parents: [[API:EPrints/Workflow#stage|stage]]
<!-- Edit below this comment -->
 
 
<!-- Pod2Wiki= -->
</div>
<!-- Pod2Wiki=item_component -->
===component===
 
Parents: {{API:PodLink|file=|package_name=|section=stage|text=/stage}}


Children: {{API:PodLink|file=|package_name=|section=field|text=/field}}
: Children: [[API:EPrints/Workflow#field|field]]


Attributes: type
: Attributes: type


  &lt;component type="Field::Multi"&gt;
<pre>  &lt;component type="Field::Multi"&gt;
     &lt;field ref="title" /&gt;
     &lt;field ref="title" /&gt;
     &lt;field ref="abstract" /&gt;
     &lt;field ref="abstract" /&gt;
   &lt;/component&gt;
   &lt;/component&gt;</pre>
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
<span style='display:none'>User Comments</span>
<!-- Edit below this comment -->
 
 
<!-- Pod2Wiki= -->
</div>
<!-- Pod2Wiki=item_field -->
===field===
 
Parents: {{API:PodLink|file=|package_name=|section=component|text=/component}}


Children: {{API:PodLink|file=|package_name=|section=sub_field|text=/sub_field}}
* field
: Parents: [[API:EPrints/Workflow#component|component]]


Attributes: ref
: Children: [[API:EPrints/Workflow#sub_field|sub_field]]


  &lt;field ref="title" input_cols="40" /&gt;
: Attributes: ref
 
<tt>field</tt> includes a metafield in the workflow. Any property can be set for the field by supplying it as an attribute.


<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '>
<pre> &lt;field ref="title" input_cols="40" /&gt;</pre>
<span style='display:none'>User Comments</span>
<!-- Edit below this comment -->


: <code>field</code> includes a metafield in the workflow. Any property can be set for the field by supplying it as an attribute.


<!-- Pod2Wiki= -->
* flow
</div>
: Parents: [[API:EPrints/Workflow#workflow|workflow]]
<!-- Pod2Wiki=item_flow -->
===flow===


Parents: {{API:PodLink|file=|package_name=|section=workflow|text=/workflow}}
: Children: [[API:EPrints/Workflow#stage|stage]]


Children: {{API:PodLink|file=|package_name=|section=stage|text=/stage}}
<pre>  &lt;flow&gt;
 
  &lt;flow&gt;
     &lt;stage ref="files" /&gt;
     &lt;stage ref="files" /&gt;
     &lt;stage ref="details" /&gt;
     &lt;stage ref="details" /&gt;
   &lt;/flow&gt;
   &lt;/flow&gt;</pre>
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
<span style='display:none'>User Comments</span>
<!-- Edit below this comment -->
 
 
<!-- Pod2Wiki= -->
</div>
<!-- Pod2Wiki=item_stage -->
===stage===


Parents: {{API:PodLink|file=|package_name=|section=workflow|text=/workflow}}, {{API:PodLink|file=|package_name=|section=flow|text=/flow}}
* stage
: Parents: [[API:EPrints/Workflow#workflow|workflow]], [[API:EPrints/Workflow#flow|flow]]


Children: {{API:PodLink|file=|package_name=|section=component|text=/component}}
: Children: [[API:EPrints/Workflow#component|component]]


Attributes: ref, name
: Attributes: ref, name


  &lt;stage name="details"&gt;
<pre>  &lt;stage name="details"&gt;
     &lt;component&gt;&lt;field ref="title"/&gt;&lt;/component&gt;
     &lt;component&gt;&lt;field ref="title"/&gt;&lt;/component&gt;
   &lt;/stage&gt;
   &lt;/stage&gt;</pre>
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
<span style='display:none'>User Comments</span>
<!-- Edit below this comment -->


* sub_field
: Parents: [[API:EPrints/Workflow#field|field]]


<!-- Pod2Wiki= -->
: <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.
</div>
<!-- Pod2Wiki=item_sub_field -->
===sub_field===


Parents: {{API:PodLink|file=|package_name=|section=field|text=/field}}
: See [[API:EPrints/Workflow#field|field]] for possible attributes.


<tt>sub_field</tt> allows properties to be set for sub-fields of [[API:EPrints/MetaField/Compound|EPrints::MetaField::Compound]] and sub-classed field types.
* workflow
: Children: [[API:EPrints/Workflow#flow|flow]], [[API:EPrints/Workflow#stage|stage]]


See {{API:PodLink|file=|package_name=|section=field|text=/field}} for possible attributes.
<pre> &lt;workflow xmlns="http://eprints.org/ep3/workflow"&gt;
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '>
<span style='display:none'>User Comments</span>
<!-- Edit below this comment -->
 
 
<!-- Pod2Wiki= -->
</div>
<!-- Pod2Wiki=item_workflow -->
===workflow===
 
Children: {{API:PodLink|file=|package_name=|section=flow|text=/flow}}, {{API:PodLink|file=|package_name=|section=stage|text=/stage}}
 
  &lt;workflow xmlns="http://eprints.org/ep3/workflow"&gt;
     &lt;flow&gt;
     &lt;flow&gt;
       ...
       ...
Line 146: Line 86:
       ...
       ...
     &lt;/stage&gt;
     &lt;/stage&gt;
   &lt;/workflow&gt;
   &lt;/workflow&gt;</pre>
 
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
<span style='display:none'>User Comments</span>
<!-- Edit below this comment -->
<!-- Edit below this comment -->




<!-- Pod2Wiki= -->
<!-- Pod2Wiki= -->
</div>
<!-- Pod2Wiki=head_methods -->
<!-- Pod2Wiki=head_methods -->
==METHODS==
==METHODS==
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
<!-- Pod2Wiki=head_new -->
<span style='display:none'>User Comments</span>
===new===
<!-- Edit below this comment -->


<source lang="perl">$language = EPrints::Workflow->new( $session, $workflow_id, %params )


<!-- Pod2Wiki= -->
</source>
</div>
<!-- Pod2Wiki=item_new -->
===new===
 
$language = EPrints::Workflow-&gt;new( $session, $workflow_id, %params )
Create a new workflow object representing the specification given in the workflow.xml configuration
Create a new workflow object representing the specification given in the workflow.xml configuration


# needs more config - about object etc.
# needs more config - about object etc.


<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
<span style='display:none'>User Comments</span>
<!-- Edit below this comment -->
<!-- Edit below this comment -->




<!-- Pod2Wiki= -->
<!-- Pod2Wiki= -->
</div>
<!-- Pod2Wiki=head_add_workflow_flow -->
<!-- Pod2Wiki=item_add_workflow_flow -->
===add_workflow_flow===
===add_workflow_flow===


$repository-&gt;add_workflow_flow( $workflowid, $id, $types, $stages )
<source lang="perl">$repository->add_workflow_flow( $workflowid, $id, $types, $stages )
 
</source>
Add a flow to the workflow which is applicable for the types in types and contains the stages in 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.  
The $id is used to remove everything relating to this is from the workflow.  


<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
<span style='display:none'>User Comments</span>
<!-- Edit below this comment -->
<!-- Edit below this comment -->




<!-- Pod2Wiki= -->
<!-- Pod2Wiki= -->
</div>
<!-- Pod2Wiki=head_copyright -->
<!-- Pod2Wiki=head_copyright -->
==COPYRIGHT==
==COPYRIGHT==
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #ccepadding: 0em 1em 0em 1em; font-size: 80%; '>
Copyright 2000-2011 University of Southampton.
<span style='display:none'>User Comments</span>
 
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/.
 
<!-- Edit below this comment -->
<!-- Edit below this comment -->




<!-- Pod2Wiki= -->
<!-- Pod2Wiki= -->
</div>
<!-- Pod2Wiki=_postamble_ -->
<!-- Pod2Wiki=_postamble_ --><!-- Edit below this comment -->
<!-- Edit below this comment -->

Latest revision as of 09:56, 22 January 2013

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/.