<?xml version='1.0' encoding='UTF-8'?>

<Properties version="4.1">
	<Property name="xslt.base64Zipped">true</Property>
	<Property name="xslt.ignoreInput">true</Property>
	<Property name="xslt.params" type="List">
		<Property name="var.session">var.session</Property>
		<Property name="var.loginName">var.loginName</Property>
	</Property>
	<Property name="xslt.saveAtServer">true</Property>
	<Property name="xslt.setAllVariablesAsTransformerParams">true</Property>
	<Property name="xslt.source"></Property>
	<Property name="xslt.sourceVariables" type="Map">
		<Property name="ISInvokingModule">VAM_api_wfc_userFromDB</Property>
		<Property name="ISModuleId">349872</Property>
		<Property name="ISCurrentTime">1480324918702</Property>
		<Property name="var.loginName">bpcadmin</Property>
		<Property name="ISInvokingWorkflow">VAM_api_main_attachUser</Property>
		<Property name="ISWorkflowName">VAM_api_main_userFromDB</Property>
		<Property name="ISGlobalProcessId">212</Property>
		<Property name="var.session" type="XmlDocument">&lt;?xml version="1.0" encoding="UTF-8"?>
&lt;session>&lt;configuration>&lt;api> 
    &lt;database>&lt;!--&lt;uri>jdbc:oracle:thin:@dev03.virtimo.net:1521:xe&lt;/uri>-->&lt;!--&lt;driverclass>oracle.jdbc.OracleDriver&lt;/driverclass>-->&lt;driverclass>com.microsoft.sqlserver.jdbc.SQLServerDriver&lt;/driverclass> 
      &lt;uri>jdbc:sqlserver://dev01.virtimo.net:1433;DatabaseName=DEV03_IS61_AM;SelectMethod=cursor&lt;/uri>  
      &lt;user> 
        &lt;loginName>DEV03_ASSETMANAGEMENT&lt;/loginName>  
        &lt;password>9z88FiwYkypkbZyUMSdC&lt;/password> 
      &lt;/user>  
      &lt;default> 
        &lt;alertTimeout>20&lt;/alertTimeout>  
        &lt;queryTimeout>60&lt;/queryTimeout> 
      &lt;/default>&lt;type>postgresql&lt;/type> 
    &lt;/database>  
    &lt;entity> 
      &lt;validate>false&lt;/validate> 
    &lt;/entity>  
    &lt;response> 
      &lt;debuggingInformation>false&lt;/debuggingInformation>  
      &lt;format>false&lt;/format>  
      &lt;validate>true&lt;/validate> 
    &lt;/response>  
    &lt;user> 
      &lt;maxAge>P0DT0H0M5S&lt;/maxAge>  
    &lt;/user>&lt;technicalUser> 
      &lt;loginName>sys&lt;/loginName> 
    &lt;/technicalUser>&lt;alerting> 
      &lt;recipient> 
        &lt;eMailAddress>kaufhold@virtimo.de &lt;/eMailAddress> 
      &lt;/recipient>&lt;mail> 
      &lt;host>smtp.googlemail.com&lt;/host>  
      &lt;sender> 
        &lt;eMailAddress>jochen@virtimo.net &lt;/eMailAddress> 
      &lt;/sender>  
      &lt;debuggingInformation>true&lt;/debuggingInformation> 
    &lt;/mail> 
    &lt;/alerting>&lt;backend>&lt;imnot>&lt;url>https://localhost:7080/im/1/rest/&lt;/url>&lt;/imnot>&lt;bpc>&lt;url>http://localhost:8181/cxf/bpc-core/authentication&lt;/url>&lt;/bpc>&lt;/backend> 
  &lt;/api>&lt;am>&lt;database>&lt;!--&lt;uri>jdbc:oracle:thin:@dev03.virtimo.net:1521:xe&lt;/uri>-->&lt;!--&lt;driverclass>oracle.jdbc.OracleDriver&lt;/driverclass>-->&lt;driverclass>com.microsoft.sqlserver.jdbc.SQLServerDriver&lt;/driverclass> 
      &lt;uri>jdbc:sqlserver://dev01.virtimo.net:1433;DatabaseName=DEV03_IS61_AM;SelectMethod=cursor&lt;/uri>  
      &lt;user> 
        &lt;loginName>DEV03_ASSETMANAGEMENT&lt;/loginName>  
        &lt;password>9z88FiwYkypkbZyUMSdC&lt;/password> 
      &lt;/user>  
      &lt;default> 
        &lt;alertTimeout>20&lt;/alertTimeout>  
        &lt;queryTimeout>60&lt;/queryTimeout> 
      &lt;/default>&lt;type>mssql&lt;/type> 
    &lt;/database> 
      
      
    &lt;entity> 
      &lt;validate>false&lt;/validate> 
    &lt;/entity>  
      
      
    &lt;technicalUser> 
      &lt;loginName>sys&lt;/loginName> 
    &lt;/technicalUser>
      
      
     
  &lt;/am>&lt;userGroupName>VAM&lt;/userGroupName>&lt;/configuration>&lt;startTimestamp>1480324918322&lt;/startTimestamp>&lt;/session></Property>
		<Property name="ISUserName">VAM</Property>
		<Property name="ISProcessId">212</Property>
		<Property name="ISModuleName">VAM_api_empty</Property>
		<Property name="ISServerName">dev03.virtimo.net</Property>
		<Property name="var.log" type="XmlDocument">&lt;?xml version="1.0" encoding="UTF-8"?>
&lt;log>&lt;entries/>&lt;/log></Property>
	</Property>
	<Property name="xslt.stylesheet" type="XmlDocument">&lt;?xml version="1.0" encoding="UTF-8"?>
&lt;xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:am="http://www.bosch-si.com/2013/AM" exclude-result-prefixes="#all" version="2.0">  
  &lt;xsl:import href="inubitmodule://VAM_api_XSLT_Tools"/>
  &lt;xsl:output method="xml" encoding="UTF-8"/>&lt;xsl:param name="var.session" as="element()"/>&lt;xsl:param name="var.loginName"/>
  
  &lt;xsl:template match="/">&lt;queries&gt;&lt;query properties="force" queryID="user">
        &lt;value>&lt;xsl:text>select u.id,
u.displayName,
u.loginName,
u.name,
u.emailAddress,
u.active,
u.locale,
u.language,
u.country,
&lt;/xsl:text>&lt;xsl:value-of select="am:timestampFromDB('u.lastUpdatedOn')"/>&lt;xsl:text>
from users u

where u.loginname = &lt;/xsl:text>&lt;xsl:value-of select="am:stringToDB($var.loginName)"/>&lt;/value>
      &lt;/query>&lt;query properties="force" queryID="organizations">&lt;value>&lt;xsl:text>select o.id,
o.active,
o.displayName,
o.name,&lt;/xsl:text>&lt;xsl:value-of select="am:nodeFromDB('o.configuration')"/>&lt;xsl:text>
from organizations o


join use_organizations uo
on o.id = uo.organizationId

join users u
on uo.userId = u.id

where u.loginName =&lt;/xsl:text>&lt;xsl:value-of select="am:stringToDB($var.loginName)"/>&lt;/value>
        
      &lt;/query>&lt;query properties="force" queryID="roles">
        &lt;value>&lt;xsl:text>select r.userid, r.role
from users u
join use_roles r
on u.id = r.userId

where u.loginname = &lt;/xsl:text>&lt;xsl:value-of select="am:stringToDB($var.loginName)"/>&lt;/value>
      &lt;/query>&lt;/queries>
    
  &lt;/xsl:template>
&lt;/xsl:stylesheet></Property>
	<Property name="xslt.target"></Property>
	<Property name="xslt.transformer">net.sf.saxon.TransformerFactoryImpl</Property>
</Properties>