Files
ofbiz-framework/framework/service/entitydef/entitymodel.xml
T
Adrian Crum 7692f1851b Updated the job scheduler to use temporal expressions. Recurrence rules still work - so there is no rush to change existing installations.
I moved the recurrence count to the job sandbox. Keeping counters in the recurrence info was a bad idea. Any other code that relied upon counters in recurrence info will have to be redesigned to use temporal expressions.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@695695 13f79535-47bb-0310-9956-ffa450edef68
2008-09-16 00:10:17 +00:00

182 lines
9.3 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<entitymodel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/entitymodel.xsd">
<!-- ========================================================= -->
<!-- ======================== Defaults ======================= -->
<!-- ========================================================= -->
<title>Entity of an Open For Business Project Component</title>
<description>None</description>
<copyright>Copyright 2001-2008 The Apache Software Foundation</copyright>
<author>None</author>
<version>1.0</version>
<!-- ========================================================= -->
<!-- ======================== Data Model ===================== -->
<!-- The modules in this file are as follows: -->
<!-- - org.ofbiz.service.schedule -->
<!-- - org.ofbiz.service.semaphore -->
<!-- ========================================================= -->
<!-- ========================================================= -->
<!-- org.ofbiz.service.schedule -->
<!-- ========================================================= -->
<entity entity-name="JobSandbox" package-name="org.ofbiz.service.schedule" title="Job Scheduler Sandbox Entity"
sequence-bank-size="100">
<field name="jobId" type="id-ne"></field>
<field name="jobName" type="name"></field>
<field name="runTime" type="date-time"></field>
<field name="poolId" type="name"></field>
<field name="statusId" type="id"></field>
<field name="parentJobId" type="id"></field>
<field name="previousJobId" type="id"></field>
<field name="serviceName" type="name"></field>
<field name="loaderName" type="name"></field>
<field name="maxRetry" type="numeric"></field>
<field name="authUserLoginId" type="id-vlong"></field>
<field name="runAsUser" type="id-vlong"></field>
<field name="runtimeDataId" type="id"></field>
<field name="recurrenceInfoId" type="id"><description>Deprecated - use tempExprId instead</description></field>
<field name="tempExprId" type="id"><description>Temporal expression id</description></field>
<field name="currentRecurrenceCount" type="numeric"></field>
<field name="maxRecurrenceCount" type="numeric"></field>
<field name="runByInstanceId" type="id"></field>
<field name="startDateTime" type="date-time"></field>
<field name="finishDateTime" type="date-time"></field>
<field name="cancelDateTime" type="date-time"></field>
<prim-key field="jobId"/>
<relation type="one" fk-name="JOB_SNDBX_RECINFO" rel-entity-name="RecurrenceInfo">
<key-map field-name="recurrenceInfoId"/>
</relation>
<relation type="one" fk-name="JOB_SNDBX_TEMPEXPR" rel-entity-name="TemporalExpression">
<key-map field-name="tempExprId"/>
</relation>
<relation type="one" fk-name="JOB_SNDBX_RNTMDTA" rel-entity-name="RuntimeData">
<key-map field-name="runtimeDataId"/>
</relation>
<relation type="one" fk-name="JOB_SNDBX_AUSRLGN" title="Auth" rel-entity-name="UserLogin">
<key-map field-name="authUserLoginId" rel-field-name="userLoginId"/>
</relation>
<relation type="one" fk-name="JOB_SNDBX_USRLGN" title="RunAs" rel-entity-name="UserLogin">
<key-map field-name="runAsUser" rel-field-name="userLoginId"/>
</relation>
<relation type="one" fk-name="JOB_SNDBX_STTS" rel-entity-name="StatusItem">
<key-map field-name="statusId"/>
</relation>
<index name="JOB_SNDBX_RUNSTAT">
<index-field name="runByInstanceId"/>
<index-field name="statusId"/>
</index>
</entity>
<entity entity-name="RecurrenceInfo"
package-name="org.ofbiz.service.schedule"
title="Recurrence Info Entity">
<field name="recurrenceInfoId" type="id-ne"></field>
<field name="startDateTime" type="date-time"></field>
<field name="exceptionDateTimes" type="very-long"></field>
<field name="recurrenceDateTimes" type="very-long"></field>
<field name="exceptionRuleId" type="id-ne"></field>
<field name="recurrenceRuleId" type="id-ne"></field>
<field name="recurrenceCount" type="numeric"><description>Not recommended - more than one process could be using this RecurrenceInfo</description></field>
<prim-key field="recurrenceInfoId"/>
<relation type="one" fk-name="REC_INFO_RCRLE" rel-entity-name="RecurrenceRule">
<key-map field-name="recurrenceRuleId"/>
</relation>
<relation type="one" fk-name="REC_INFO_EX_RCRLE" title="Exception" rel-entity-name="RecurrenceRule">
<key-map field-name="exceptionRuleId" rel-field-name="recurrenceRuleId"/>
</relation>
</entity>
<entity entity-name="RecurrenceRule"
package-name="org.ofbiz.service.schedule"
title="Recurrence Rule Entity">
<field name="recurrenceRuleId" type="id-ne"></field>
<field name="frequency" type="short-varchar"></field>
<field name="untilDateTime" type="date-time"></field>
<field name="countNumber" type="numeric"></field>
<field name="intervalNumber" type="numeric"></field>
<field name="bySecondList" type="very-long"></field>
<field name="byMinuteList" type="very-long"></field>
<field name="byHourList" type="very-long"></field>
<field name="byDayList" type="very-long"></field>
<field name="byMonthDayList" type="very-long"></field>
<field name="byYearDayList" type="very-long"></field>
<field name="byWeekNoList" type="very-long"></field>
<field name="byMonthList" type="very-long"></field>
<field name="bySetPosList" type="very-long"></field>
<field name="weekStart" type="short-varchar"></field>
<field name="xName" type="very-long"></field>
<prim-key field="recurrenceRuleId"/>
</entity>
<entity entity-name="RuntimeData" package-name="org.ofbiz.service.schedule" title="Runtime Data Entity"
sequence-bank-size="100">
<field name="runtimeDataId" type="id-ne"></field>
<field name="runtimeInfo" type="very-long"></field>
<prim-key field="runtimeDataId"/>
</entity>
<!-- Note: TemporalExpression values should be treated as immutable.
In other words, they should be created once and left unmodified by user
interaction. -->
<entity entity-name="TemporalExpression"
package-name="org.ofbiz.service.schedule"
title="Temporal Expression">
<field name="tempExprId" type="id-ne"></field>
<field name="tempExprTypeId" type="id-ne"></field>
<field name="date1" type="date-time"></field>
<field name="date2" type="date-time"></field>
<field name="integer1" type="numeric"></field>
<field name="integer2" type="numeric"></field>
<field name="string1" type="id"></field>
<field name="string2" type="id"></field>
<prim-key field="tempExprId"/>
</entity>
<entity entity-name="TemporalExpressionAssoc"
package-name="org.ofbiz.service.schedule"
title="Temporal Expression Association">
<field name="fromTempExprId" type="id-ne"><description>The "parent" expression</description></field>
<field name="toTempExprId" type="id-ne"><description>The "child" expression</description></field>
<field name="exprAssocType" type="id"><description>Expression association type, applies to DIFFERENCE expression types only. Valid values are INCLUDED or EXCLUDED.</description></field>
<prim-key field="fromTempExprId"/>
<prim-key field="toTempExprId"/>
<relation type="one" fk-name="TEMP_EXPR_FROM" rel-entity-name="TemporalExpression" title="From">
<key-map field-name="fromTempExprId" rel-field-name="tempExprId"/>
</relation>
<relation type="one" fk-name="TEMP_EXPR_TO" rel-entity-name="TemporalExpression" title="To">
<key-map field-name="toTempExprId" rel-field-name="tempExprId"/>
</relation>
</entity>
<!-- ========================================================= -->
<!-- org.ofbiz.service.semaphore -->
<!-- ========================================================= -->
<entity entity-name="ServiceSemaphore" package-name="org.ofbiz.service.semaphore" title="Semaphore Lock Entity"
sequence-bank-size="100">
<field name="serviceName" type="name"></field>
<field name="lockThread" type="name"></field>
<field name="lockTime" type="date-time"></field>
<prim-key field="serviceName"/>
</entity>
</entitymodel>