> Did you execute any specific commands for Interoperability to monitor the files in the pipeline?
No. I don't use IRIS Interoperability on the pipeline architecture.
The pipeline was created on AWS CodePipeline, and the pipeline runs automatically when pushed to git repository.
Hi,
You need use Persistent class.
https://docs.intersystems.com/irislatest/csp/documatic/%25CSP.Documatic....
Community article.
https://community.intersystems.com/post/art-mapping-globals-classes-1-3
Like this.(Display ^Hban global on Dbeaver what used SQL.)
Class Gbl.Hban Extends %Persistent [ SqlRowIdPrivate, StorageStrategy = MyGlobalStorage ]
{
/// Index
Index KeyIndex On (year, key) [ IdKey, Unique ];
/// first key
Property year As %Integer [ Required, SqlColumnNumber = 2 ];
/// second key
Property key As %String [ Required, SqlColumnNumber = 3 ];
/// third key
Property data As %String;
Storage MyGlobalStorage
{
<Description>
<![CDATA[]]></Description>
<SQLMap name="GblMap">
<Data name="data">
<Delimiter>"^"</Delimiter>
<Piece>1</Piece>
</Data>
<Global>^Hban</Global>
<RowIdSpec name="1">
<Expression>{L1}</Expression>
<Field>year</Field>
</RowIdSpec>
<RowIdSpec name="2">
<Expression>{L2}</Expression>
<Field>key</Field>
</RowIdSpec>
<Subscript name="1">
<Expression>{year}</Expression>
</Subscript>
<Subscript name="2">
<Expression>{key}</Expression>
</Subscript>
<Type>data</Type>
</SQLMap>
<StreamLocation>^Gbl.TestS</StreamLocation>
<Type>%Storage.SQL</Type>
}
}
Certifications & Credly badges:
Yuji has no Certifications & Credly badges yet.
Global Masters badges:
![Popular writer](https://community.intersystems.com/sites/default/files/badges/poular_writer.png)
![Curious Member](https://community.intersystems.com/sites/default/files/badges/curious_member_badge.png)
![Thorough Member](https://community.intersystems.com/sites/default/files/badges/thorough_member_badge.png)
![DC Author](https://community.intersystems.com/sites/default/files/badges/dc_author_0.png)
![DC Commenter](https://community.intersystems.com/sites/default/files/badges/dc_commenter_1.png)
![DC Problem Solver](https://community.intersystems.com/sites/default/files/badges/dc_problem_solver_1.png)
![InterSystems Researcher](https://community.intersystems.com/sites/default/files/badges/researcher.png)
Followers:
Yuji has no followers yet.
Following:
Yuji has not followed anybody yet.
The buildspec.yaml is just to check what git source has compile errors.
version: 0.2 env: variables: RESULT: 0 phases: build: commands: # Make Directory for compile check. - mkdir -p /user/local/work # Copy files what get from CodeCommit. - cd .. - cp -r * /user/local/work - chmod -R 777 /user/local/work # Start container's IRIS. - su - irisowner -c "iris start IRIS" # Import check. - su - irisowner -c "iris terminal IRIS \"##CLASS(%SYSTEM.OBJ).ImportDir(\\\"/user/local/work\\\",\\\"*.cls;*.mac;*.int;*.inc;*.dfi\\\",\\\"k\\\",,1)\" " | tee result.txt - sh ./chk_err.sh # Compile check. - su - irisowner -c "iris terminal IRIS \"##CLASS(%SYSTEM.OBJ).CompileAll(\\\"ck\\\")\" " | tee result.txt - sh ./chk_err.sh - su - irisowner -c "iris terminal IRIS \"##CLASS(%Library.MessageDictionary).ImportDir(\\\"/user/local/work/01/res\\\")\" " | tee result.txt - sh ./chk_err_md.sh # These sh is check result.txt that has errors. - post_build: commands: - cd $CODEBUILD_SRC_DIR_main_out - mv make_flg_file.bat ../ - mv appspec.yml ../ - cd .. - mv 00 base - mv 01 main - ls -al
And appspec.yaml is to store sources to any directory.
version: 0.0 os: windows files: - source: / destination: E:\deploy\base
After that, Importing to iris is done by creating an interoperability job and using the file detection mechanism.
Import program.
ClassMethod ImportDir(path As %String, flag As %String = "k") As %Status { Do ..Log("ImportDir Start:"_path_" / "_flag) Set errorLog = "" Set imported = "" Set selectedlist = "" Set count = 0 If (##class(%File).DirectoryExists(path)) { Set status = $SYSTEM.OBJ.ImportDir(path, "*.cls;*.mac;*.int;*.inc;*.dfi", flag, .errorLog , 1, .imported, , .selectedlist) Set prg = "" For { Set prg = $ORDER(imported(prg)) If (prg = "") { Quit } Set count = count + 1 } } Else { Set status = $$$ERROR($$$GeneralError, "パスが存在しません。"_path) } Do ..Log("ImportDir End:"_count) Return status }