HomeArticlesSlideshowsAsk BobLogin or Register
NewsCustom SearchContactLinks
XML Import and export utility for SIMPLETASK
HEAP WORKFLOW
25-Aug-2013
According to principle of maintaining Logical process separately from physical implementation in SIMPLETASK the Export / Import format is necessary.
Following Add-on package contains API for import XML format. The primary intention is to use the feature for importing metadata generated from Logical process model, but it also can be used to archive physical metadata or to transfer them between environments.
Script: BWTA_XML.SQL

----------------------------------------------------------------------
-- PACKAGE BWTA_XML                                                 --
----------------------------------------------------------------------
Create or replace PACKAGE BWTA_XML AS 
  ----------------------------------------------------------------------------- 
  --Purpose: Simple processes and task management  / XML import / export     -- 
  --Author:  Bob Jankovsky, copyleft 2008, 2013                              -- 
  --History: 1.0 /21-AUG-2013 -- AddOn to BWTA SIMPLETASK                    -- 
  ------------------------------------------------------------------------------ 
  c_schema_id constant varchar2(100):='http://bobjankovsky.org/stage/bwta_simpletask.xsd';

...more

BWTA_XML.importXML Imports metadata from XML
P_XMLINCLOBXML import data
P_TAGINVARCHAR2Override tag for change management, if omit then teh original tag in XML document is used
BWTA_XML.getExport Gets XML Export
RETURNXMLTYPE
P_TAGINVARCHAR2Tag of the export
P_NOTEINVARCHAR2Note of the export
P_HEAP_MASKINVARCHAR2mask of heaps
P_TASK_MASKINVARCHAR2mask of tasks
P_RES_MASKINVARCHAR2mask of resources

Supporting functions
BWTA_XML.getDependencies Gets dependency XML tag content from metadata
RETURNXMLTYPE
P_TASK_SEQININTEGER sequence key of the task
BWTA_XML.getConsumptions Gets resource consumption XML tag content from metadata
RETURNXMLTYPE
P_TASK_SEQININTEGER sequence key of the task
BWTA_XML.getTasks Gets dependency XML tag content from metadata
RETURNXMLTYPE
P_HEAP_SEQININTEGER sequence key of the heap
P_TASK_ID_MASKINVARCHAR2mask of the chosen tasks
BWTA_XML.getProcesses Gets process XML tag content from metadata
RETURNXMLTYPE
P_HEAP_ID_MASKINVARCHAR2mask of heap identifiers
P_TASK_ID_MASKINVARCHAR2mask of task identifiers
BWTA_XML.getResources Gets resource XML tag content from metadata
RETURNXMLTYPE
P_RES_ID_MASKINVARCHAR2mask of resource identifiers

Script:

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:element name="WORKFLOW">
<xs:annotation>
<xs:documentation>Deployment unit of the Heap Workflow</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence maxOccurs="unbounded">
<xs:element name="PROCESSES" minOccurs="0">
<xs:complexType>

...more
Ludek Bob Jankovsky
All Right Reserved © 2007, Designed by Bob Jankovsky