Analysis projects are specialized containers that not only store all data pertaining to an analysis, but also manage the input and output dependencies of the analysis and enable it to be automatically executed if it becomes out-of-date. Users can create new instances of analysis project in EKM and provide information about the location of inputs and outputs, and how to execute the analysis. If you do not want users to manually enter this information every time they create a project, you can define a custom analysis project type and specify this information in the type definition.
Custom analysis projects are defined by extending the Analysis Project built-in type. You can then
use the following type attributes to specify input, output and execution
information:
inputPattern: Specifies the
path to an input file or folder containing input files. The path is
relative to the analysis project and can contain wildcards (* for any number of any character and ? for a single occurrence of any character). Any number of inputPattern type attributes can be specified.
outputPattern: Specifies
the path to an output file or folder containing output files. The
path is relative to the analysis project and can contain wildcards.
Any number of outputPattern type attributes
can be specified.
executionWorkflow: Specifies
the full path of the process template that will be executed when the
analysis project is updated. The process should not have any required
variables.
executionWorkflowVar: Specifies
a reference variable defined in the process template that will be
initialized with the instance of the analysis project that starts
the process. This is used to reference the analysis project in the
process.
Below is an example of a custom analysis project type definition.
<ekmTypes:types xmlns:ekmTypes="http://www.ansys.com/ekm/types"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.ansys.com/ekm/types ../../schema/types.xsd">
<type name="TestAnalysis" extends="AnalysisContainer" version="1.0.0">
<children>
<child name="inputs" occurs="required" type="Folder" />
<child name="outputs" occurs="required" type="Folder" />
</children>
<typeAttributes>
<typeAttribute name="inputPattern" value="inputs/*" />
<typeAttribute name="outputPattern" value="outputs/*" />
</typeAttributes>
</type>
</ekmTypes:types>The name of the custom type in the
listing is TestAnalysis. It extends the AnalysisContainer type and defines two children: inputs and outputs of type Folder. It specifies the input pattern to be inputs/*, which means that all files in the inputs subfolder
will be treated as inputs of the analysis. It specifies the output
pattern to be outputs/*, which means that all
files in the outputs subfolder will be treated as outputs of the analysis.
You can see how these sample files are used in Tutorial: Creating a Custom Analysis Project, located at the end of the Working with Analysis Projects chapter in the User’s Guide.