Clarity

  • 1.  Resource Read XOG by Employment Type

    Posted May 27, 2018 04:56 AM

    CA-PPM 14.2

     

    As per XOG documentation, I can use Employment Type (Employee or Contractor) in the Resource Read XML file

     

    Resource xog attribute--employmentType

    employmentType

    Optional. Defines the employment type.

    Values: employee and contractor

    Default: employee

    Table and Column: SRM_RESOURCES.Person_Type

    Type: String

     

    <Filter name="employmentType" criteria="EQUALS">EMPLOYEE</Filter> 

     

    I get the below error

     

    <?xml version="1.0" encoding="UTF-16"?>
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <soapenv:Header/>
    <soapenv:Body>
    <XOGOutput xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/status.xsd">
    <Object type="resource"/>
    <Status elapsedTime="0.0 seconds" state="FAILURE"/>
    <Statistics failureRecords="0" insertedRecords="0" totalNumberOfRecords="0" updatedRecords="0"/>
    <ErrorInformation>
    <Severity>FATAL</Severity>
    <Description>[Error] :0:0: attribute "name" has a bad value: the value is not a member of the enumeration.
    Invalid attribute in input document. Please remove all instances of attribute from document elements and try again.
    [Element : Filter, Attribute : name ].
    </Description>
    <Exception type="java.lang.Exception">Invalid xml data</Exception>
    </ErrorInformation>
    </XOGOutput>
    </soapenv:Body>
    </soapenv:Envelope>

     

    Any help is greatly appreciated

     

    Thanks

    -Venkitta



  • 2.  Re: Resource Read XOG by Employment Type

    Posted May 27, 2018 06:13 AM

    Please share your XML input file.

     

    " the value is not a member of the enumeration" could mean that value in the file is what is displayed for a lookup attribute while the lookup code should be used (300 or 301)



  • 3.  Re: Resource Read XOG by Employment Type

    Posted May 27, 2018 07:37 AM

    Thanks urmas.  Here is the Resource Read XML file

     

    <?xml version="1.0" encoding="UTF-8"?>
    <NikuDataBus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/nikuxog_read.xsd">
    <Header version="6.0.13" action="read" objectType="resource" externalSource="NIKU">
    <args name="include_contact" value="true"/>
    <args name="include_management" value="true"/>
    <args name="include_custom" value="true"/>
    <args name="include_financial" value="true"/>
    </Header>
    <Query>
    <!-- <Filter name="primaryRoleID" criteria="EQUALS">ARCHITECT</Filter>
    <Filter name="isActive" criteria="EQUALS">true</Filter>
    <Filter name="resourceType" criteria="OR">EXPENSE, MATERIAL</Filter>
    <Filter name="resourceID" criteria="EQUALS">MLT45692</Filter>

    <Filter name="resourceID" criteria="OR">admin%, %admin</Filter> -->
    <Filter name="employmentType" criteria="EQUALS">EMPLOYEE</Filter> 


    </Query>
    </NikuDataBus>



  • 4.  Re: Resource Read XOG by Employment Type

    Posted May 27, 2018 11:25 AM

    Sorry to say I could not make it work either.

    When I read the documentation it says

    Read Filters

    The XOG allows for outbound processing of users who are based on the following fields:

    • Resource Type
    • Active

    That is no other filters. I do see the field employmentType in the schema, but not as a filter.

    Where do you see it as a filter?

     

    You could read the error message also

    Invalid attribute in input document. meaning that there is an unsupported filter field.

    and

    [Error] :0:0: attribute "name" has a bad value

    meaning that the next word that comes after Filter name cannot be used.



  • 5.  Re: Resource Read XOG by Employment Type

    Posted May 28, 2018 01:04 AM

    Hi Urmas

     

    Is there any document available on what attributes, should I use in the filter section?  Basically, I want to extract only employees and update some information.

     

    I took the OOTB Resource Read XML file and added the filter 'Employment Type'

     

    Any idea?

     

    Thanks



  • 6.  Re: Resource Read XOG by Employment Type

    Posted May 28, 2018 01:48 AM

    When I read the documentation it says

    Read Filters

    The XOG allows for outbound processing of users who are based on the following fields:

    • Resource Type
    • Active

    That is no other filters. I do see the field employmentType in the schema, but not as a filter.

     

    According to that no other filter fields are available.So you would get all employee types.

    The ways I am aware of to work around that are manual edit of the result file,

    the XSLT transformations which Federico of ITRoi has demonstrated and

    using a Excel Export from a query based portlet which is then added with xml tags.



  • 7.  Re: Resource Read XOG by Employment Type

    Posted May 29, 2018 07:53 AM

    Hi,

     

     

    In my Resource Write xm file (rsm_resources_write.xml), I can see employmentType inserted as follows:

     

    <Resource employmentType="EMPLOYEE" externalId=" " includeInDatamart="true" isActive="true" isExternal="false" resourceId="..."
    resourceType="LABOR" username="...">

     

    Hope this helps!

     

    Regards,

    Suhail.



  • 8.  Re: Resource Read XOG by Employment Type

    Posted May 29, 2018 09:17 AM

    As you say it is in Resource Write file as field value not a filter field in the Resource Read file.