Passa al contenuto principale
Administrator Guide
Ultimo aggiornamento: 2023-06-23
Riferimenti: Metodi MVEL

Riferimenti: Metodi MVEL

Metodo
Descrizione
Codice di esempio
Output di esempio
getClass().getName()
Recupera il tipo di una proprietà o di una variabile.
props['p.myProperty']=true props['p.myProperty'].getClass().getName()
java.lang.Boolean
getEndpoint()
Recupera l'endpoint di un report RaaS quando si utilizza una richiesta SOAP.
@{intsys.reportService.getEndpoint('Report Alias')}
customreport2/<tenant_name>/<username>/report_name_in_XML_format
getExtrapath()
Recupera il percorso aggiuntivo di un report RaaS.
intsys.reportService.getExtrapath('<your workday-in Report Service Alias>')
customreport2/<tenant_name>/<username>/<Custom Report Name>
indexOf()
Recupera la posizione di un carattere specifico all'interno di una stringa di input.
props['input.document.reference'] = 'FoundationDataCollection/4d196113' props['index.of.separator'] = props['input.document.reference'].indexOf("/")​
24
leftPad()
Aggiunge caratteri all'inizio di una stringa di input.
org.apache.commons.lang.StringUtils.leftPad('1234', 10,'0')
0000001234
listToCommaDelimString()
Converte un elenco di valori di matrice in una stringa e li separa con virgole.
props[p.workers] = [1234, 7890] props['p.workers'] = lp.getWIDs('Pay Group Members') props['p.workers.ids'] = props['p.workers'] != empty ? util.listToCommaDelimString(props['p.workers'])
1234,7890
replaceAll()
Sostituisce tutte le istanze dei caratteri specificati all'interno di una stringa di input.
props['p.employee.id'] = '12345pdf_a.pdf' props['p.current.id'] = props['p.employee.id'].replaceAll('[^0-9]','')
12345
substring()
Recupera parte di una stringa di input.
props['p.test.string'] = 'test' props['p.test.substring'] = props['p.test.string'].substring(0,2)
te
toUpperCase()
Converte una stringa in maiuscolo.
props['p.test.string'] = 'workday Studio' props['p.test.string'].toUpperCase()
WORKDAY STUDIO
URLEncoder ()
Recupera una stringa contenente solo caratteri URL validi.
props['p.report.parameters'] = 'Full_Name=' # 'Logan McNeil' props['REST.URL'] = java.net.URLEncoder.encode(props['p.report.parameters'], 'UTF-8')
Full_Name=Logan%20McNeil