Maximo Open Forum

 View Only

 Cron Task Parameters

Jump to Best Answer
  • Customizations
  • Maximo User Groups
Appu nair's profile image
Appu nair posted 05-14-2021 18:01
I have a need to create a CronTask for this I saw extending
psdi.server.SimpleCronTask gives me what I need to run except one 
aspect. I need to make a parameter password(CRYPTO) 
I saw an example of  LdapSyncCronTask that has a Credential Parameter that 
is perhaps the masked kind. I checked in DB and when I add in the regular
crontask it gets stored as plain text where in the LDAPcrontask it gets stored in 
the CRYPTOVALUE column. So what would I need to make my crontask
similar to the LDAP task.All I have at the moment is something like this

public CrontaskParamInfo[] getParameters() {
CrontaskParamInfo[] paramInfo = new CrontaskParamInfo[7];
paramInfo[0] = new CrontaskParamInfo();
paramInfo[0].setName("MYPASSWORD");
paramInfo[0].setDescription("", "PASSWORD TO CONNECT)");

what is the LDAPCRON doing AFAIK it is also doing the same things ecept instead of line by line parameter declaration they have it as string arrays...


Thanks for any pointers you can give me...
Prashant Sharma's profile image
Prashant Sharma Best Answer

Maximo uses DESede encryption algorithm for Cypto & Cryptox data types to handle encrypted passwords.

CRONTASKPARAM has an attribute CRYPTOVALUE - Field to store cron task parameters that require encryption, such as passwords which you should use to save password in encrypted form.  

psdi.util.MXCipherX  is OOB class to provide required methods to encrypt & decrypt string.

byte[] encValue = mbo.getBytes("cryptovalue");  ---> to get Cryptovalue from table Crontaskparam

String decValue = (MXServer.getMXServer().getMXCipher().decData(encValue)  ---> to get decrypted String from encrypted value.

Hope this helps.

Thanks,

Prashant