Text File Utilities

Overview

Reads data from a text file (any extension encoded as text) into a string, with an option to preserve line breaks.

 

Anonymous
  • yes, I am also experiencing issues with the new version of the plugin. Nothing has changed in our implementation and this functionality was working for us with the old version of the plugin. Now it is throwing error in the logs.


    2024-10-23 10:17:25,298 [Appian Work Item - 794645 - WorkID 292 - execution02 - process 2775155 - model 12462 : UnattendedJavaActivityRequest] ERROR com.appiancorp.ps.plugins.textutilities.AppendTextToFile - java.lang.NullPointerException: Cannot invoke "com.appiancorp.suiteapi.content.ContentService.download(java.lang.Long, java.lang.Integer, java.lang.Boolean)" because "cs" is null
    java.lang.NullPointerException: Cannot invoke "com.appiancorp.suiteapi.content.ContentService.download(java.lang.Long, java.lang.Integer, java.lang.Boolean)" because "cs" is null
    	at com.appiancorp.ps.plugins.textutilities.AppianUtils.getDocumentFromAppian(AppianUtils.java:15)
    	at com.appiancorp.ps.plugins.textutilities.AppendTextToFile.run(AppendTextToFile.java:48)
    	at com.appiancorp.process.runtime.framework.DefaultActivityExecutor$1.lambda$call$0(DefaultActivityExecutor.java:138)
    	at com.appiancorp.plugins.PluginUsageLogger.runWithPluginInformation(PluginUsageLogger.java:54)
    	at com.appiancorp.process.runtime.framework.DefaultActivityExecutor$1.call(DefaultActivityExecutor.java:138)
    	at com.appiancorp.process.runtime.framework.DefaultActivityExecutor$1.call(DefaultActivityExecutor.java:132)
    	at com.appiancorp.common.ContextClassLoaderSwitcher.runInContext(ContextClassLoaderSwitcher.java:30)
    	at com.appiancorp.process.runtime.framework.DefaultActivityExecutor.execute(DefaultActivityExecutor.java:132)
    	at com.appiancorp.process.engine.UnattendedJavaActivityRequest.execute(UnattendedJavaActivityRequest.java:101)
    	at com.appiancorp.process.engine.UnattendedJavaActivityRequestResponseCreator.getJavaActivityResultResponse(UnattendedJavaActivityRequestResponseCreator.java:23)
    	at com.appiancorp.process.engine.UnattendedJavaActivityRequest.getJavaActivityResultResponse(UnattendedJavaActivityRequest.java:80)
    	at com.appiancorp.process.engine.UnattendedJavaActivityRequest.execute0(UnattendedJavaActivityRequest.java:67)
    	at com.appiancorp.common.persistence.data.AppianDataUserContextProvider.executeWithConsistentDataReads(AppianDataUserContextProvider.java:143)
    	at com.appiancorp.process.engine.ProcessContinuationRequest.executeOuter(ProcessContinuationRequest.java:68)
    	at com.appiancorp.process.engine.ActivityRequest.executeOuter(ActivityRequest.java:41)
    	at com.appiancorp.process.engine.ContinuationRequest.execute(ContinuationRequest.java:136)
    	at com.appiancorp.process.engine.AsyncEnabledActivityRequest.execute(AsyncEnabledActivityRequest.java:22)
    	at com.appiancorp.process.workpoller.UnattendedRequestHandlerBean.onMessage(UnattendedRequestHandlerBean.java:36)
    	at com.appiancorp.process.workpoller.WorkItem.run(WorkItem.java:110)
    	at org.springframework.jca.work.SimpleTaskWorkManager$DelegatingWorkAdapter.run(SimpleTaskWorkManager.java:241)
    	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
    	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
    	at java.base/java.lang.Thread.run(Thread.java:840)

  • v3.0.1 Release Notes
    • Adding in logging for errors in AppendTextToFile
  • Are you able to share the document and what you are appending? My tests of this smart service have completed successfully so it's probably related to your particular use case.

  • The Smart Service "Append Text to File" has stopped working with release 3.0.0 !!

  • v3.0.0 Release Notes
    • Updating deprecated ContentService apis
  • Now that Appian 24.1 is out, is updating this plugin still on the roadmap?

  • In the 23.2 release, Appian introduced modernized file management APIs that offer a cleaner abstraction layer for easier file handling within Appian. We simultaneously announced that we are deprecating some older APIs. We are aware of the utilization of deprecated APIs within some AppMarket plug-ins that work with documents. As part of our commitment to ensuring compatibility, we anticipate all Appian-authored plug-ins currently using deprecated APIs to be updated for API compatibility by the 24.1 General Availability (GA) release. We also proactively work with Partner plug-in authors to ensure all AppMarket plug-ins have optimal performance and functionality. 

    If you have any questions or require AppMarket assistance, please don't hesitate to reach out by sending an email to appmarket@appian.com.

  • It is planned a new version for this plugin?
    The heath check report is saying that is using deprecated API's.
    In a future this can be a problem. 

    "Text File Utilities (com.appiancorp.plugins.filereader) references deprecated Appian APIs
    [deprecated] com.appiancorp.suiteapi.content.ContentService.getInternalFilename(java.lang.Long)
    [deprecated] com.appiancorp.suiteapi.knowledge.Document.getInternalFilename()"

  • can anyone tell how should we implement the function readTextFromFile in our inteface and what inputs should we provide for the parameters. 

  • Yes, it works in 21.x and higher