KB

Hello,

I'm  adding a text into the model via a script and an additional requirement here is I dont to want the "Last Change" and "Last User" system attributes of the model to be changed.

To achieve this below are the steps used in the script :
1)calling setAutoTouch(false) 
2)adding the text(via logic) into the model
3)saving the model via ArisData.Save(Constants.SAVE_IMMEDIATELY) 
4)calling setAutoTouch(true).


Please note : setAutoTouch(false) - disable system attributes updates and setAutoTouch(true) - enables system attributes updates.


However after executing the script we're experiencing wierd behaviour where we need to specifically go to each model to save the changes(which means the models are written but are not yet commit via script).

Can someone pls guide is anything is missing here ?

by Theo Padding
Posted on Mon, 05/02/2022 - 14:12

Hi,

I have the same problem. I want to update an attribute but do not want the last change date and last user to be updated automatically. The touch function seems to be deprecated, but now we end up with a lot of system users as last user due to this automatic update. I created a report, which updates an attribute in an assigned model, via APG with 'arisservice' user and is now automatically the last user.

Please help :-)

Regards,

Theo Padding

0
by Martin Schröder
Badge for 'Contributor' achievement
Posted on Tue, 05/03/2022 - 19:26

Hello Krishna,

as much as I can see ArisData.getActiveDatabase().setAutoTouch() is still not explained in Aris 10.0.17.3 Script Help. Somewhere on the road they changed the default DB Save mode to SAVE_AUTO (cf. Report class ArisData - Method Save), so I guess you will need to combine both:

//all subsequent modifications to database objects are only performed in memory.
ArisData.Save(Constants.SAVE_ONDEMAND);
ArisData.getActiveDatabase().setAutoTouch(false); // No touch
....

ArisData.Save(Constants.SAVE_IMMEDIATELY); // revert save mode
ArisData.getActiveDatabase().setAutoTouch(true);

As an example look up how SAG used it in the standard report "Import translated attributes".

I am not sure if Save(Constants.SAVE_IMMEDIATELY)really does save contents or only changes the Save Mode for subsequent changes. Script Help authors often use preposterous semantics:

SAVE_IMMEDIATELY: All changes will be stored immediately into the database

It's a promise for the future, not present tense. So you might need to change s.th. afterwards.

Regards, Martin

0
by KRISHNA BODDU Author
Posted on Wed, 05/04/2022 - 06:32

Hello Martin,

Thanks for your swift response.

We're able to edit the model without updating the system attributes.

We've another few issues(mentioned below) with respect to text that we're inserting into the model.

1) line breaks - We're unable to break the text line and entire text is coming in one single line even after using "\n".

2)Font Format for text- Unable to change the font format. We had a look in ARIS Help but couldn't find any functions for making text "Bold" and change the "Font Size".

Can you pls help with these issues ?

Regards,

Krishna Boddu

 

0
by Martin Schröder
Badge for 'Contributor' achievement
Posted on Wed, 05/04/2022 - 16:27

Hello Krishna,

I can only guess what you mean by "adding a text into the model", so this post might be a solution. It covers the save mode topic as well.

It would be easier to get a response if you presented extracts from your code here to describe the problem.

Regards, Martin

0

Featured achievement

Rookie
Say hello to the ARIS Community! Personalize your community experience by following forums or tags, liking a post or uploading a profile picture.
Recent Unlocks

Leaderboard

|
icon-arrow-down icon-arrow-cerulean-left icon-arrow-cerulean-right icon-arrow-down icon-arrow-left icon-arrow-right icon-arrow icon-back icon-close icon-comments icon-correct-answer icon-tick icon-download icon-facebook icon-flag icon-google-plus icon-hamburger icon-in icon-info icon-instagram icon-login-true icon-login icon-mail-notification icon-mail icon-mortarboard icon-newsletter icon-notification icon-pinterest icon-plus icon-rss icon-search icon-share icon-shield icon-snapchat icon-star icon-tutorials icon-twitter icon-universities icon-videos icon-views icon-whatsapp icon-xing icon-youtube icon-jobs icon-heart icon-heart2 aris-express bpm-glossary help-intro help-design Process_Mining_Icon help-publishing help-administration help-dashboarding help-archive help-risk icon-knowledge icon-question icon-events icon-message icon-more icon-pencil forum-icon icon-lock