0 Followers · 129 Posts

NET Framework (pronounced dot net) is a software framework developed by Microsoft that runs primarily on Microsoft Windows.

Official site.

.NET support in InterSystems Data Platform.

Question Daniel Aguilar · Nov 4, 2020

Good Morning,

I have this question for a long time. When I make an insert by SQL from an external application in the fields of type %String, if they are empty, it writes the character $c(0) in the global.

Is there a way so that if an Insert is received in a field of type% String with null value instead of the $ c (0) it leaves it empty?:

I have the class defined like this:

Class User.MiClase Extends (% Persistent,% XML.Adaptor)

and the property like this:

Property myProperty As% String;

I have tried creating a trigger or setting default values but it doesn't work.

7
0 1202
Question neel Je · Nov 4, 2020

I am trying to use IRIS Native API in .NET code I see following code snippet here https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cl…

  IRISReference valueRef = new IRISReference(""); // set inital value to null string
  iris.ClassMethodString("%SomeClass","SomeMethod",valueRef);
  String myString = valueRef.value;               // get the method result

But IRISReference is not available as a type.

 What reference (dlls) do I need to add for that? I have InterSystems.Data.IRISClient.dll , what else do I need? what am I missing here?

3
0 274
Article Bob Kuszewski · Jun 19, 2020 5m read

Migrate from Java Business Host to PEX

With the release PEX in InterSystems IRIS 2020.1 and InterSystems IRIS for Health 2020.1, customers have a better way to build Java into productions than the Java Business Host. PEX provides a complete set of APIs for building interoperability components and is available in both Java and .NET. The Java Business Host has been deprecated and will be retired in a future release.

Advantages of PEX

  • Allows developers to create any Production component in either Java or .NET
  • More complex message structures can be passed between components
  • Simplified settings
  • Simplified development workflow with no need for ObjectScript.

The rest of this article focuses on how to migrate existing Java Business Host code to PEX.

Overview

The classes and interfaces used for PEX are different from Java Business Host (JBH). We'll provide an overview of the differences here, but the full documentation will give you more depth.

Converting a Business Service from Java Business Host to PEX

In order to build a PEX Business Service, you need to implement com.intersystems.enslib.pex.BusinessService instead of com.intersystems.gateway.bh.BusinessService.

The design pattern used by PEX for Business Service has changed from one where the service is expected to start a thread to produce messages to one where the service implements a function that is called periodically to produce messages.

In JBH, your code would look something like this

  @Override
  public boolean OnInit(Production p) throws Exception {
    production = p;

    if (messageThread == null) {
      Messager messager = new Messager();
      messageThread = new Thread(messager);
      messageThread.start();
    }
  
    return true;
  }

In PEX, you just need to implement three functions

  public void OnInit() throws Exception {
    // Initialization
    return;
  }

  public Object OnProcessInput(Object messageInput) throws Exception {
    // Here is where you call SendMessage() or SendMessageAsync()

    return null;
  }

  public void OnTearDown() throws Exception {
    // Shut down
    return;
  }

You'll also need to change how settings are used, messages delivered, and logging is done. More on those below.

Converting a Business Operation from Java Business Host to PEX

In order to build a PEX Business Operation, you need to implement com.intersystems.enslib.pex.BusinessOperation instead of com.intersystems.gateway.bh.BusinessOperation.

The design pattern for Business Operations is structurally the same between JBH and PEX, but the parameters to two main entry points have changed.

Changes to OnInit()

In PEX, OnInit() takes no parameters.

Changes to OnMessage()

In PEX, OnMessage() is given a generic Object instead of the String used in JBH. This allows the author of the production to pass any sort of message desired.

In JBH your application might have looked something like this

  public boolean OnMessage(String message) throws Exception {
    // Business logic here
    return true;
  }

In PEX, the parameter is a generic Java Object that you need to cast appropriately, which allows you to transmit more complex messages than just strings. Here's an example of how to extract a request that is a file stream.

  public Object OnMessage(Object request) throws Exception {
    com.intersystems.jdbc.IRISObject streamContainer = (com.intersystems.jdbc.IRISObject)request;
    com.intersystems.jdbc.IRISObject str = (com.intersystems.jdbc.IRISObject)streamContainer.get("Stream");
    String originalFilename = (String)streamContainer.get("OriginalFilename");

    Long contentSize = (Long)str.get("Size");
    String content = (String)str.invoke("Read", contentSize);

    // Business logic here

    return null;
  }

You'll also need to change how settings are used, messages delivered, and logging is done. More on those below.

Settings

Declaration of settings has been simplified.

In JBH configuration was declared via a SETTINGS string and fetched via code that looks something like this:

  String setting = production.GetSetting("Min");
  if (!setting.isEmpty()) {
    min = Integer.parseInt(setting);
  }

In PEX, settings are just public member fields. These are automatically populated when the class is instantiated.

  public int Min = 0;

Any public member field is available to be set in your production as long as the member field is a base Java type (String, int, etc.).

Messages

Message sending is more powerful. In JBH messages are sent as strings. In PEX, messages are sent as objects - either IRISObject, for objects that are defined in ObjectScript, or a subclass of com.intersystems.enslib.pex.Message, for classes defined in Java.

In JBH, your code would look like this

  production.SendRequest(value.toString());

In PEX, it would be something like this

  MyExampleMessageClass req = new MyExampleMessageClass("message to send"); 
  SendRequestAsync(Target, req);

Logging

Logging functions are all similar, just named differently.

In PEX, you'd log an informational message via LOGINFO()

  LOGINFO("Received message");

Object Gateway

The Java Business Host needed its own gateway. With PEX, you can use a single Java gateway for all your Java needs. Or you can use many gateways. It's up to you. Here's a good introduction to the java gateway.

Conclusion and Feedback

If you haven't tried PEX yet, what are you waiting for? PEX provides the ability to solve a far wider array of business problems with less code, plus you can now do everything in .NET as well.

If you have any questions or problems moving your JBH application to PEX, please reach out myself or the WRC.

4
1 923
Question Robert Bee · Feb 13, 2019

Edit:

May have found the issue but not the solution.

"SELECT * FROM wmhISTORYdETAIL" runs as a passthrough without asking for the DNS.

but

'SELECT Count([wmhISTORYdETAIL].[HistHMNumber] AS CountOfHistHMNumber FROM [wmhISTORYdETAIL] WHERE ((([wmhISTORYdETAIL].[HistMovType])='Receipt') AND (([wmhISTORYdETAIL].[HistMovDate])>=Date()-1) AND (([wmhISTORYdETAIL].[HistMovDate])<Date()));'

asks for the DNS but both are linked to a table that has the password saved.

Any Ideas please?

Rob

Hi

1
0 423
Announcement Anastasia Dyubaylo · Jun 13, 2020

Hey Developers,

We're pleased to invite you to join the next InterSystems IRIS 2020.1 Tech Talk: Using Java and .NETon June 16 at 10:00 AM EDT! 

In this installment of InterSystems IRIS 2020.1 Tech Talks, we put the spotlight on extending InterSystems IRIS with your own custom Java and .NET code. We will demo how to create a custom interoperability component with the new Productions Extensions (PEX) feature. Following that, we’ll demo how to call Java or .NET code from any ObjectScript code.

     

2
1 324
Question Flávio Lúcio Naves Júnior · Oct 28, 2019

Hello,

I am having a problem with SQL Select, the command in portal is OK, show all items, but when I use a CacheDataAdapter in VB .NET show the message 'Incorrect list format 0>=0'.  What could be this message? Because is the same SQL command.

Best Regards.

8
0 804
Announcement Anastasia Dyubaylo · Jun 1, 2020

Hi Community!

This week is a voting week for the InterSystems IRIS Native API Programming Contest! We have 8 applications — so you have a set of applications to choose from!

 

How to vote? This is easy: you will have one vote, and your vote goes either in Experts Nomination or in Community Nomination.

5
1 399
Announcement Anastasia Dyubaylo · May 9, 2020

Hi Developers!

We are pleased to announce the next competition in creating open-source solutions using InterSystems IRIS Data Platform!

Please welcome the third InterSystems IRIS Online Programming Contest for Developers!

And the topic for this contest is InterSystems IRIS Native API.

The contest will last three weeks: May 18 – June 7, 2020

 

28
1 2104
Question Malik Ahmed · May 25, 2020

Hi !

I am getting below error in my .NET MVC project, I am IRIS Entity Framwork, in the database table filed and model having the same datatype int.

The specified cast from a materialized 'System.Int64' type to the 'System.Int32' type is not valid db Table creation Id field is created with [xDBC Type = BIGINT]

Please kindly advice me.

Thank you

1
0 3832
Announcement Anastasia Dyubaylo · May 13, 2020

Hi Developers,

Please welcome the new video specially recorded by InterSystems Product Manager @Bob Kuszewski for the 3rd InterSystems Online Programming Contest on InterSystems IRIS Native API:

⏯ Using the IRIS Native API GitHub Template

What’s the contest about?

In the last year, InterSystems added and expanded Native APIs for Java, .NET, Python, and Node.js. The Native API provides high speed access to globals, the ability to instantiate and use ObjectScript objects, and fine-grained control over transactions.

6
0 532
Announcement Anastasia Dyubaylo · May 13, 2020

Hi Community!

We are glad to invite all the developers to the upcoming  InterSystems IRIS Native API Contest Kick-Off Webinar! The topic of this webinar is dedicated to the 3rd IRIS Programming Contest.

Date & Time: Monday, May 18 — 9:00 AM EDT

Speakers:  
@Bob Kuszewski, InterSystems Product Manager
@Evgeny Shvarov, InterSystems Developer Ecosystem Manager

  

What awaits you? Please check the agenda below:

1
0 360
Question Christopher Kennedy · May 8, 2020

I am importing scriptlink wsdl in the form designer.  I get the following error: 

Error Importing WSDL.  Please validate WSDL address.  ERROR #6301: SAX XML Parser Error attribute value expected while processing Annonymous Stream at line 28 offset 73.

Please advise. 

Thank you, 

Chris Kennedy

5
0 465
Question Mohamed Hassan Anver · Apr 8, 2020

Hi There,

I have Microsoft Visual Studio Community 2019 installed and tried to setup the entity framework as per Using Entity Framework with InterSystems IRIS Data Platform (https://learning.intersystems.com/course/view.php?id=1046)  tutorial but I can't see the ISC data source in MS Visual Studio's Data source section. Does this mean that MS VS Community 2019 is not supported with the Entity Frmawork?

Hassan

2
0 445
InterSystems Official Raj Singh · Apr 12, 2020

I’m excited to announce that InterSystems will be joining the open source community for InterSystems ObjectScript extension to Visual Studio Code. Early this year I posted that we were on a journey to redefine the future of our IDE strategy, and what came out of that is Visual Studio Code is the IDE that can support that future. It’s fast, stable, feature-rich, and built on a modern technology architecture that affords us the ability to offer you far more functionality around your ObjectScript activities than ever before, particularly in the area of DevOps, continuous development, and collaborative programming.

The developer community agrees with us, as for the first time in my memory, a product has captured more than half of the market share for general purpose IDEs. The language story is even more striking, with VS Code being used exponentially more than any other IDE. Other than Java, which is still split very evenly, all other developer communities have chosen VS Code. Innovation only happens where there’s a community to support it, and more and more every year, that place is VS Code.

In addition to deciding on VS Code as a platform, we’ve also made the significant decision to, instead of building our own extension from scratch, join the open source community to advance the existing effort created by @Dmitry Maslennikov, who has done an amazing job building a tool with which many are already doing productive ObjectScript work.

Our mission for the project is to develop VS Code support for server-side workflows familiar to long-time InterSystems customers, while also offering a client-centric workflow paradigm more in line with the way mainstream programmers think.

To be clear, we are not there yet, and getting the existing tool to that point will take time. But we expect to deliver a version of the VS Code extension to ObjectScript that is production quality and supported by InterSystems by the end of the year. Another important point is, Studio will continue to have an important place in our IDE plans for a long time to come. If Studio suits your needs, you have nothing to worry about. It stays the tool of choice for those with the most sophisticated requirements, such the biggest code bases and low-code editing needs. But our development efforts will focus on VS Code.

What happens now?

The first order of business is to have you try it out and provide feedback. To make that easier we’ll be working hard to make frequent documentation updates on the GitHub project’s wiki.

If you find something that doesn’t work, or a feature you’d like to see, please add it to the GitHub issues board. I know many InterSystems users are not familiar with using GitHub, so we’ll be talking a bit about that here in the coming weeks.

This is open source

You’ve probably noticed that feedback and communications on this product are all happening in the open. This will continue to be open source software, with InterSystems being a major voice in the community, but far from the only voice. Open source principles will underpin all activities around this project, structured by formal governance principles outlined in the governance.md file in the GitHub repository. Here are the highlights:

  • Anyone can post an issue – which is a bug or feature requestabout
  • Anyone can submit a pull request (PR) to add a feature, fix a bug or enhance documentation
  • Committers can approve PRs
  • The Project Management Committee (PMC) approves committers and prioritizes the issues list, thereby setting the project roadmap
  • The PMC is chaired by @Dmitry Maslennikov and includes 2 InterSystems members and @John Murray
  • The PMC strives for consensus but requires a simple majority vote

What's next

Try out VS Code and get your issues in. We’ll be processing that input over the coming weeks to work out a roadmap that will get us to a version 1.0 production release that InterSystems will formally support through normal channels.

Learn more about this work, and modernizing development practices in general. CaretDev featuring @Dmitry Maslennikov will be offering a webinar on April 14th, and InterSystems will have a webinar focused on IDEs in mid-May. We’ll also be posting articles here on various IDE-related topics, such as continuous integration and testing, leveraging the cloud with services such as Azure DevOps, and managing multi-language projects.

It’s going to be a very exciting year for development tools in this community, and I’m looking forward to helping you all take your business to new levels!

Important links

3
6 1858
Question Jeffrey Drumm · Jan 6, 2020

While I can query the HL7 message class EnsLib.HL7.Message (EnsLib_HL7.Message for SQL) to my heart's content in the SQL Shell or the Management Portal's SQL page, I can't seem to SELECT anything other than ID/%Id from an ADO/ODBC client. Properties such as TimeCreated, Name, MessageTypeCategory, etc. all seem to prevent the query from ever completing EXCEPT when I provide the ID as part of the WHERE criteria.

This works fine in the Management Portal and Shell:

7
0 506
Question Stefan Rieger · Feb 28, 2020

trying importing classDefinition to Iris via LoadStream() fails with <INVALID OREF>zLoadStream+1^%SYSTEM.OBJ.1 ----> InterSystems.Data.IRISClient.IRISException : Exception thrown on server (code = 1192)...

Code is here; use any valid exported ClassDefinition as File to test that:

    public static void loadClassFromStream(this IRIS iris, string txt)
    {

        // IRISObject globalCharStr = IrisStreamExtensions.FromTxt(iris, text);
        var fp = @"C:\tmp\TestClass.xml";
        txt = File.ReadAllText(fp);
        
        var stream = new MemoryStream();
        var bytes = Encoding.Default.GetBytes(txt);
        stream.Write(bytes, 0, bytes.Length);
        stream.Flush();
        stream.Position = 0;
        
        var qspec = "/display=none /compile=0 /recursive=0 /relatedclasses=0 /subclasses=0";
        var errorlog = "";
        var loadedItems = "";
        
        var parameter = new object[]
        {
            stream, 
            qspec,  
            errorlog,
            loadedItems
        };

        try
        {
            iris.ClassMethodStatusCode("%SYSTEM.OBJ", "LoadStream", parameter);
        }
        catch (Exception e)
        {
            throw new IrisException("%SYSTEM.OBJ", "LoadStream", e);
        }            

    }
4
0 411
Question Stefan Rieger · Feb 2, 2020

will InterSystems fix the Transaction-Handling for  the  .Net Connection Provider?

Nor the  Property IsTransactionAcvtive nor TransactionLevel is set on the  Connection  when using BeginTransaction.

Latest PreView will give me   problem as InterSystems removed removed the TStart() Option to create the Transaction that way which gave back a TransactionObject whith working versions...

2
1 369
Question Brian Cromwell · Feb 4, 2020

I am developing a viewer for Crystal Reports using the Crystal Reports for Visual Studio (CR13SP26).  I have also installed the latest ODBC Drivers for Cache, but when I connect some reports to the Cache database using a connection string, I get an error that I failed to retrieve data from the database, and it reports the Database Vendor Code 30.  Has anyone used Crystal Reports connecting via a connection string and received this error?  If so, how did you correct it?

Thank you,

Brian Cromwell

2
0 952
Article Tony Coffman · Feb 6, 2020 1m read

Hello Community,

Thank you all for your continued feedback and support of our ad hoc reporting platform, VDM.  There's been some questions around setting up a non-ODBC connection for InterSystems platforms.  We published a new YouTube video showing the steps necessary to connect to InterSystems Caché and InterSystems IRIS with BridgeWorks VDM. 

0
3 270