发布新帖

查找

问题
· 三月 11, 2022

JOB command fails with Embedded Python

It sounds strange though it's embarrassing.

I have a class with ClassMethods written in ISOS and Embedded Python.

The ClassMethods written in ISOS start in the Background as usual. No problems

But my 

ClassMethod setPy() [ Language = python ]
{
import iris, datetime, time
- - -

Just fails the JOB command with (even 15 sec) timeout and $ZC=0
This is not funny

My actual workaround:
I created a ClassMethod in ISOS, that does an elegant JobStart
and this ClassMethod only runs the Embedded Python ClassMethod.

I'm not amused and hope there is just an undocumented/unknown param missing

I have a feeling about what's going on. But it's not for public discussion. 

4 Comments
讨论 (4)2
登录或注册以继续
问题
· 三月 3, 2022

Customizing SDA in HealthInsight - excluded tables

i'm trying to extend both the MemberEnrollment and the MedicalClaim objects in HS.  The CareProvider is perfect for some of my extensions (Operating provider, referring provider, third-party insurer), but the documentation says https://docs.intersystems.com/irisforhealthlatest/csp/docbook/DocBook.UI...

 

I need something that is just like a CareProvider, and I will be using the CarePRoviderType as a CodeTableDetail.  

 

Why is CareProvider excluded?  Does this mean I can't add property HS.Local.SDA3.MemberEnrollment.PHPProvider as HS.SDA3.CodeTableDetail.CareProvider?  

 

What is a better solution? Yes, this is also going to go to HealthInsight, so I'll need an analogous table in HSAA.

 

Thanks,

Laura

2 Comments
讨论 (2)1
登录或注册以继续
文章
· 二月 25, 2022 阅读大约需 7 分钟

GlobalToJSON-embeddedPython-pure#3

In my article I described the work using iris.gref .
As the official documetation is rather slim on the subject it was necessary to dig into it.
Using the power of Python I was able to detect what I needed but was hidden.
I decided to share this with you. pydoc did the magic. 

And this is it:

>>> pydoc.help(iris)
Help on built-in module iris:
NAME
    iris
CLASSES
    builtins.object
        isc.StdoutType
        isc.gref     Global = class gref(builtins.object)
     |  InterSystems IRIS global reference object.
     |  Use the iris.gref() method to obtain a reference to a global
     |
     |  Methods defined here:
     |
     |  __delitem__(self, key, /)
     |      Delete self[key].
     |
     |  __getitem__(self, key, /)
     |      Return self[key].
     |
     |  __len__(self, /)
     |      Return len(self).
     |
     |  __setitem__(self, key, value, /)
     |      Set self[key] to value.
     |
     |  get(...)
     |      Given the keys of a global, returns the value stored at that node of the global.
     |      Example: x = g.get([i,j]) sets x to the value stored at key i,j of global g.
     |
     |  getAsBytes(...)
     |      Given the keys of a global, returns a string stored at that node of the global, as bytes.
     |      Example: x = g.getAsBytes([i,j]) sets x to the value stored at key i,j of global g, as bytes.
     |
     |  keys(...)
     |      Traverses a global starting at the specified key, returning each key in the global.
     |      Example: for key in g.keys([i, j]) traverses g from key i,j, returning each key in turn.
     |
     |  kill(...)
     |      Given the keys of a global, kills that node of the global and its subtree.
     |      Example: g.kill([i,j]) kills the node stored at key i,j of global g and any descendants.
     |
     |  order(...)
     |      Given the keys of a global, returns the next key of the global.
     |      Example: j = g.order([i,j]) sets j to the next second-level key of global g.
     |
     |  orderiter(...)
     |      Traverses a global starting at the specified key, returning the next key and value as a tuple.
     |      Example: for (key, value) in g.orderiter([i,j]) traverses g from key i,j, returning the next key and value.
     |
     |  query(...)
     |      Traverses a global starting at the specified key, returning each key and value as a tuple.
     |      Example: for (key, value) in g.query([i,j]) traverses g from key i,j, returning each key and value in turn
     |
     |  set(...)
     |      Given the keys of a global, sets the value stored at that key of the global.
     |      Example: g.set([i,j], 10) sets the value of the node at key i,j of global g to 10
     |
     |  ----------------------------------------------------------------------
     |  Static methods defined here:
     |
     |  __new__(*args, **kwargs) from builtins.type
     |      Create and return a new object.  
     |      See help(type) for accurate signature. Stdout = class StdoutType(builtins.object)
     |  isc.Stdout objects
     |
     |  Methods defined here:
     |
     |  flush(...)
     |      no-op
     |
     |  isatty(...)
     |      false
     |
     |  read(...)
     |      IRIS internal
     |
     |  read1(...)
     |      IRIS internal
     |
     |  readline(...)
     |      IRIS internal
     |
     |  write(...)
     |      IRIS internal
     |
     |  ----------------------------------------------------------------------
     |  Static methods defined here:
     |
     |  __new__(*args, **kwargs) from builtins.type
     |      Create and return a new object.  See help(type) for accurate signature.
     |
     |  ----------------------------------------------------------------------
     |  Data descriptors defined here:
     |
     |  encoding
     |      encoding
FUNCTIONS
    check_status(...)
        Raises an exception on an error status, or returns None if no error condition occurs.
        Example: iris.check_status(st) checks the status code st to see if it contains an error.     cls(...)
        Returns a reference to an InterSystems IRIS class.
        Example: iris.cls("%SYSTEM.INetInfo").LocalHostName() calls a method in the class %SYSTEM.INetInfo.     gref(...)
        Returns a reference to an InterSystems IRIS global.
        Example: g = iris.gref("^foo") sets g to a reference to global ^foo     lock(...)
        Sets locks, given a list of lock names, an optional timeout value (in seconds), and an optional locktype.
        Example: iris.lock(["^foo","^bar"], 30, "S") sets locks "^foo" and "^bar", waiting up to 30 seconds, and using shared locks.     ref(...)
        Creates an iris.ref object with a specified value.
        Example: iris.ref("hello") creates an iris.ref object with the value "hello"     routine(...)
        Invokes an InterSystems IRIS routine, optionally at a given tag.
        Example: iris.routine("Stop^SystemPerformance", "20211221_160620_test") calls tag Stop in routine ^SystemPerformance.     tcommit(...)
        Marks a successful end of an InterSystems IRIS transaction.
        Example: iris.commit() marks the successful end of a transaction and decrements the nesting level by 1     tlevel(...)
        Detects whether a transaction is currently in progress and returns the nesting level. Zero means not in a transaction.
        Example: iris.tlevel() returns the current transaction nesting level, or zero if not in a transaction     trollback(...)
        Terminates the current transaction and restores all journaled database values to their values at the start of the transaction.
        Example: iris.trollback() rolls back all current transactions in progress and resets the transaction nesting level to 0     trollbackone(...)
        Rolls back the current level of nested transactions, that is, the one initiated by the most recent tstart().
        Example: iris.trollbackone() rolls back the current level of nested transactions and decrements the nesting level by 1     tstart(...)
        Starts an InterSystems IRIS transaction.
        Example: iris.tstart() marks the beginning of a transaction.     unlock(...)
        Removes locks, given a list of lock names, an optional timeout value (in seconds), and an optional locktype.
        Example: iris.unlock(["^foo","^bar"], 30, "S") removes locks "^foo" and "^bar", waiting up to 30 seconds, and using shared locks.
DATA
    sql = <iris.%SYS.Python.SQL object>
    utils = <iris.%SYS.Python.Utils object>
FILE
    (built-in) >>>

There are missing pieces and some strange behavior.
But definitely more important stuff than in the official documentation.
I didn't try everything.  So there's a lot of room for your discoveries

讨论 (0)1
登录或注册以继续
问题
· 二月 25, 2022

Optimal Apache/Web Gateway settings

After what is seemed was weeks, I finally got SSL/TLS enabled on both Apache Web Server and IRIS using the Web Gateway. However while we can now use HTTPS to connect to our Development instance of IRIS, I am running into several errors when I have others try to access the Management Portal via HTTPS.

We are seeing...

  • "Unexpected status code, unable to process Hyper Event: Internal Server Error (500)"
  • Server Unavailable

Does anyone have a Optimal settings list that I need to set for Apache/Web Gateway https? I am assuming the errors listed above are some kind of time out or settings somewhere.

Thanks

Scott Roth

6 Comments
讨论 (6)3
登录或注册以继续
问题
· 二月 25, 2022

Separating Code, and Data databases in Installer Manifest using a containerized IRIS and durable %SYS feature

Hello,

The title says it all. I’m building an IRIS image with docker-compose using a separate Dockerfile. Pretty straightforward procedure: I import a Installer script inside the container containing a Installer Manifest I defined. Within the manifest, I create a namespace with code and data databases in separate locations. My intention is to keep the code database inside the container, so whenever I build the container, the imported code is replaced. The data, however, should be persistent.

Without setting the ISC_DATA_DIRECTORY environment variable, I can see from the Management Portal, after I built and started the container, that the databases are in separate locations as expected. For clarity’s sake, I defined that the code database (Namespace-Code) is in /code/NameSpace-Code/ directory and the Data is in /usr/irisssys/mgr/Namespace-Data

If I define the ISC_DATA_DIRECTORY environment variable and mount a corresponding docker volume, I would expect the Data db to be moved to the persistent volume and the Code db to be inside the /code folder withing the container. However, when doing so, for whatever reason, the Code db is moved to the persistent volume as well. When I checked the database locations from the Management Portal after enabling the durable %SYS feature, suddenly the Code database location was in /durable/irissys/db/code/NameSpace-Code/ and the data db was in /durable/irissys/db/usr/irisssys/mgr/Namespace-Data folder. It seems like the ISC_DATA_DIRECTORY variable value is appended in the beginning of the db path.

Is there anything I can do to prevent the Code db to be moved to the persistent volume and instead just move the Data db there instead? The Data db path is also a bit weird. It would be great if the Data db would be within /durable/irissys/mgr folder.

Any idea if I’m doing something fundamentally wrong with this?

If needed, I can copy and paste some docker configurations I use, even though they are pretty much copy and pasted from examples provided by InterSystems.

Just to clarify, everything is working great, but I just need the Code database to live within the container instead of being persistent.

Thanks for any insight and/or examples!

Kari

6 Comments
讨论 (6)2
登录或注册以继续