# FolderWorkflow
This app will help to integrate folder creation and renaming with another module. E.g. if an entry is created in content_explorer
module folder will be created based on the configuration.
# Installation
Install the 4App called 4allportal-folder-workflow
.
# Configuration
The workflow configuration will be under
modules/<module_name>/workflow_events/<connector_name>.xml
Follow the instruction from here for workflow (opens new window)
In the following configuration snippet entry folder_paths
of type
array
contains the structure for folder paths.(Entry key and type
should not be changed.)
Programm/Film/{originaltitel.charAt(0).toUpperCase()}/{originaltitel}/Anlieferung
here originaltitel
is a field from content_explorer
module which
will be used for folder naming and if originaltitel
contains the value
changeling then the output folder structure will be
Programm/Film/C/changeling/Anlieferung
For entry pre_tagging
of type java.util.HashMap
contains
java.util.HashMap
which contains value and class. (Entry key and
type should not be changed.) <entry key="ce_relation" class="java.util.HashMap">
here key is the field name for the pre-tag.
<entry key="value">{id}</entry> <entry key="class">CEIdList</entry>
here value contains {id}
which will generate value from field in
module content_explorer
and class contains the type of field. Add as
many pre-tags as necessary.
Entry fields
contains the field name from content_explorer
used in
the configuration.
Entry folder_foreign_field_name
contains the name of the relational
field created in folder
module. (Entry key and type should not be
changed.) Entry module_foreign_field_name
contains the name of the
relational field created in content_explorer
module. (Entry key and
type should not be changed.)
<actions>
<action class="com.cm4ap.FolderWorkflowAction">
<parameters>
<entry key="folder_paths" class="array">
<value>Programm/Film/{originaltitel.charAt(0).toUpperCase()}/{originaltitel}/Anlieferung</value>
<value>Programm/Serie/{serientitel.charAt(0).toUpperCase()}/{serientitel}/Anlieferung</value>
<value>Programm/Serie/{serientitel.charAt(0).toUpperCase()}/{serientitel}/Staffel {staffelnummer}/Episode {episodennummer}</value>
</entry>
<entry key="pre_tagging" class="java.util.HashMap">
<entry key="ce_relation" class="java.util.HashMap">
<entry key="value">{id}</entry>
<entry key="class">CEIdList</entry>
</entry>
<entry key="stuffel_nummer" class="java.util.HashMap">
<entry key="value">{staffelnummer}</entry>
<entry key="class">CEInteger</entry>
</entry>
</entry>
<entry key="fields" class="array">
<value>id</value>
<value>originaltitel</value>
<value>serientitel</value>
<value>staffelnummer</value>
<value>episodennummer</value>
</entry>
<entry key="folder_foreign_field_name">content_explorer_id</entry>
<entry key="module_foreign_field_name">folder_id</entry>
</parameters>
</action>
</actions>
Following is the example relational of field in folder
module.
<?xml version="1.0" encoding="UTF-8"?>
<field>
<is_native>false</is_native>
<type>CEId</type>
<audit>true</audit>
<modules>
<module>content_explorer</module>
</modules>
</field>
Note!
The fields used in the previous configuration cannot be null or empty.
Module content_explorer
is used as an example.