Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

There are two types of XML databases used when storing XML data in Emakin; those are process databases and a domain database.

Domain Database

For every domain hosted on Emakin, a separate XML database is created. This database is reserved for only special use cases and Emakin does not store any data by default. You can save data into your domain database by using XmlNode.Save and $XmlRepository.Save methods.

General usage examples are as follows:

  • Storing settings for processes
  • Saving important process parameters
  • Keeping pre-formatted statistics to later display in dashboard reports
  • Storing scripts that can be loaded and executed later in processes

Since this database is reserved for custom usage, there is no default root node so you have to define a unique and describing root name when saving your data.

See below for an XML example of a custom settings data. 

Code Block
languagexml
titleSettings Data
collapsetrue
<LRDictionary>
  <Definitions>
    <HRGroup Caption="Human Resources Specialist">44ed5931-eef1-48ed-8d11-1cdef1d272dd</HRGroup>
    <HRManager Caption="Human Resources Manager">126945af-5ff5-49ef-8f55-0b702ad06530</HRManager>
    <LeaveTypes>
      <LeaveType>
        <Name>Annual</Name>
        <Code>A</Code>
        <SubLeaveTypes/>
        <Name_tr>Yıllık</Name_tr>
        <IncludeOnCalculation>True</IncludeOnCalculation>
        <HasSubTypes>false</HasSubTypes>
      </LeaveType>
      <LeaveType>
        <Name>Excuse</Name>
        <Code>E</Code>
        <SubLeaveTypes>
          <SubLeaveType>
            <Id>ac9572db-7045-4a37-a170-1781d56483d3</Id>
            <Name>Sickness</Name>
            <Name_tr>Hastalık</Name_tr>
          </SubLeaveType>
          <SubLeaveType>
            <Id>23cc603f-d037-4acc-90c9-8dc26aefb05a</Id>
            <Name>Death</Name>
            <Name_tr>Vefat</Name_tr>
          </SubLeaveType>
          <SubLeaveType>
            <Id>bc1f4fbc-1b81-4e92-9daa-b91ca39af77a</Id>
            <Name>Other</Name>
            <Name_tr>Diğer</Name_tr>
          </SubLeaveType>
        </SubLeaveTypes>
        <Name_tr>Mazeret</Name_tr>
        <IncludeOnCalculation/>
        <HasSubTypes>true</HasSubTypes>
      </LeaveType>
    </LeaveTypes>
    <Calculation/>
    <Manager2Approval>True</Manager2Approval>
    <SecondManagerApprovalExcluded>
      <Identity Caption="Irmak Bardakçı" Type="" Domain="">f2767cb6-4cb5-45a8-ad0f-a01af17c2fb6</Identity>
      <Identity Caption="Bülent Yüksel" Type="" Domain="">b8e60233-7fce-4d8d-a597-acd4fd90ce05</Identity>
      <Identity Caption="Gökhan Berker" Type="" Domain="">c0d262ef-afcb-4ec5-8cba-b402ef13727b</Identity>
      <Identity Caption="Esin Kent" Type="" Domain="">38e708df-1b8f-44e2-a13f-c35fe94e5355</Identity>
      <Identity Caption="Nesrin Cevdet" Type="" Domain="">63612ed1-0bd5-49a0-a490-c37cef4e07fd</Identity>
    </SecondManagerApprovalExcluded>
    <DayCountForWeek>5</DayCountForWeek>
  </Definitions>
</LRDictionary>

In this example, settings for the Leave Request process gets stored in domain database and its data is enclosed between <LRDictionary> tags as an arbitrary choice. It includes HR authorities' information, leave type definitions and their localization data, and a list of people for some exceptions depending on the design of this process. A settings screen designed in this process loads this XML data and lets users to modify it depending on their needs, which makes this process quite flexible.

Process Database

Every time a process created in Emakin, a separate XML database is allocated for that process automatically. All the workflows running on Emakin keep their data as XML forms and whenever a workflow gets triggered from a process, its form content and an XML metadata of this workflow gets stored into the corresponding process database alongside under the root node. Any changes made on the flow automatically updates this data, for example taking an action on a task or completing a flow.

...

Code Block
languagexml
titleForm Data
collapsetrue
<form Id="f2e38788-9dbc-4e80-8c93-0b9410c07642">
  <ExpenseForm>
    <PersonnelInformation>
      <Owner Caption="Bülent Yüksel" Type="User" Domain="cadf027b-8cc3-41e1-b0e2-ed856a0579fa">b8e60233-7fce-4d8d-a597-acd4fd90ce05</Owner>
      <RegistryNumber>4444</RegistryNumber>
      <Department Caption="Research and Development">c647464d-3745-4373-8309-0cfa0a34ae70</Department>
      <Location Caption=""/>
    </PersonnelInformation>
    <ExpenseInformation>
      <Date>2019-03-14T11:02:09.2821462+03:00</Date>
    </ExpenseInformation>
    <ExpenseList>
      <Expense>
        <Id>2ccb89d7-b32a-478a-b481-ae393caf3100</Id>
        <Date>2019-03-06T00:00:00+03:00</Date>
        <ExpenseTypeGroup Caption="Transport">16</ExpenseTypeGroup>
        <ExpenseType Caption="Highway">1601</ExpenseType>
        <CostArea/>
        <DocumentDate/>
        <Reason>Taxi fare to customer</Reason>
        <DocumentNumber/>
        <DocumentTitle/>
        <DocumentTaxNumber/>
        <Amount>18.00</Amount>
        <Unit Caption="US Dollar">USD</Unit>
        <CrossRate>1.00</CrossRate>
        <ConvertedAmount>18</ConvertedAmount>
        <VAT Caption="8">8</VAT>
      </Expense>
    </ExpenseList>
  </ExpenseForm>
</form>

Domain Database

For every domain hosted on Emakin, a separate XML database is created. This database is reserved for only special use cases and Emakin does not store any data by default. You can save data into your domain database by using XmlNode.Save and $XmlRepository.Save methods.

General usage examples are as follows:

  • Storing settings for processes
  • Saving important process parameters
  • Keeping pre-formatted statistics to later display in dashboard reports
  • Storing scripts that can be loaded and executed later in processes

Since this database is reserved for custom usage, there is no default root node so you have to define a unique and describing root name when saving your data.

See below for an XML example of a custom settings data. 

Code Block
languagexml
titleSettings Data
collapsetrue
<LRDictionary>
  <Definitions>
    <HRGroup Caption="Human Resources Specialist">44ed5931-eef1-48ed-8d11-1cdef1d272dd</HRGroup>
    <HRManager Caption="Human Resources Manager">126945af-5ff5-49ef-8f55-0b702ad06530</HRManager>
    <LeaveTypes>
      <LeaveType>
        <Name>Annual</Name>
        <Code>A</Code>
        <SubLeaveTypes/>
        <Name_tr>Yıllık</Name_tr>
        <IncludeOnCalculation>True</IncludeOnCalculation>
        <HasSubTypes>false</HasSubTypes>
      </LeaveType>
      <LeaveType>
        <Name>Excuse</Name>
        <Code>E</Code>
        <SubLeaveTypes>
          <SubLeaveType>
            <Id>ac9572db-7045-4a37-a170-1781d56483d3</Id>
            <Name>Sickness</Name>
            <Name_tr>Hastalık</Name_tr>
          </SubLeaveType>
          <SubLeaveType>
            <Id>23cc603f-d037-4acc-90c9-8dc26aefb05a</Id>
            <Name>Death</Name>
            <Name_tr>Vefat</Name_tr>
          </SubLeaveType>
          <SubLeaveType>
            <Id>bc1f4fbc-1b81-4e92-9daa-b91ca39af77a</Id>
            <Name>Other</Name>
            <Name_tr>Diğer</Name_tr>
          </SubLeaveType>
        </SubLeaveTypes>
        <Name_tr>Mazeret</Name_tr>
        <IncludeOnCalculation/>
        <HasSubTypes>true</HasSubTypes>
      </LeaveType>
    </LeaveTypes>
    <Calculation/>
    <Manager2Approval>True</Manager2Approval>
    <SecondManagerApprovalExcluded>
      <Identity Caption="Irmak Bardakçı" Type="" Domain="">f2767cb6-4cb5-45a8-ad0f-a01af17c2fb6</Identity>
      <Identity Caption="Bülent Yüksel" Type="" Domain="">b8e60233-7fce-4d8d-a597-acd4fd90ce05</Identity>
      <Identity Caption="Gökhan Berker" Type="" Domain="">c0d262ef-afcb-4ec5-8cba-b402ef13727b</Identity>
      <Identity Caption="Esin Kent" Type="" Domain="">38e708df-1b8f-44e2-a13f-c35fe94e5355</Identity>
      <Identity Caption="Nesrin Cevdet" Type="" Domain="">63612ed1-0bd5-49a0-a490-c37cef4e07fd</Identity>
    </SecondManagerApprovalExcluded>
    <DayCountForWeek>5</DayCountForWeek>
  </Definitions>
</LRDictionary>

...