API

Accessing custom table by way of a business object by way of the iMIS Api

Hello Group,

 

I am trying to get to the data in a custom table in the iMIS database, we'll call TableY by way of an iMIS business object created via the Business Object Designer, we'll call BOY by way of the iMIS API.

The general direction I am trying to go is as follows (C#):

 

using Asi.iBO;

using Asi.LExicon;

using Asi.Business;

Reducing version dependencies?

So I've got these iParts, see?  They have references to several ASI dlls, typically Asi, Asi.Business.ContentManagement, Asi.iBO, Asi.Web, Secure and Telerik.Web.UI.  I have those files in my project folder, it builds my dlls just fine and works great...until the client upgrades.  At that point, my code refuses to run because it can't find the file it was compiled against.  Telerik is the most common offender.  Moving from 15.1.1 to 15.1.2 required a new dll even though I was using only features available in both flavors.

ASIUtil requirements?

Back in the iMIS 4/iMIS 10 world, ASIUtil.dll required ASIDBUtil and ASIDBUpgrade.  I can tell that the .NET parts of iMIS use Secure.dll instead of ASIUtil, and I know some things changed in 15.1.2 for the Advanced PCI support.

Does ASIUtil 15.1.2 still require either ASIDBUtil or ASIDBUpgrade?

Is ASIUtil 15.1.2 different enough from previous versions that I would need a new Interop?

Can we create our own "preconfigured security set"?

When we export a document (IQA query, business object, content, content type, etc.) today, if that document has custom permissions it will not import into a database that didn't already have that content with custom permissions.  This comes up in the following scenarios:

  • Create a new query in Dev, set permissions, test, copy to production.
  • Create a generic iPart with permissions, import to new clients.
  • Modify the ACL for a query to include a new Role in Dev, then import to Test.
  • Import new Nav items we've set up in Dev.

Beside all that, we often have to apply the same permissions over and over to multiple items.  Having our own predefined security sets would make this a lot simpler.  (It would also keep the Access* tables from growing excessively, since each "custom set" is assigned its own key.)

Adding custom settings

In the course of creating some components for iMIS, I find the need to have some additional settings, global to all my components running in this instance of iMIS, but independent of other instances.

In iMIS 10, I would tend to put these settings in System_Params or Gen_Tables, or sometimes create a UDT in Customizer.

The web.config in the Net folder comes to mind as one place I could put these.  It seems like a good idea, since I'll have to review that file when copying \Net from test to live anyway.

Writing to the ASI log files (log4net)

I can see (*cough* Reflector *cough*) that log4net is referenced many places through the iMIS app, and appears to be responsible for writing Asi.Webroot.log and possibly other files.

  • Where can I find basic information for using log4net?
  • Are there any code samples, or specific examples easily found in code?
  • Is there an ASI wrapper for this, or do I need to invoke log4net directly?
  • Is it possible for me to invoke log4net in a way that adds my entries to Asi.Webroot.log?
  • Is it advisable to do so?  (That is, it won't cause concurrency problems with iMIS writing to it also.)

I'm assuming that my app would run inside the Net or iMIS_Public folder, and be a part of the same application space with iMIS.

ValidateUser from AsiMembership Provider returns null reference

I have the iMIS AsiMembershipProvider to a Sharepoint site as the default membership provider and it creates users correctly (as long as I provide it with a valid providerKey for an existing iMIS contact). However, it crashes with a cryptic null; reference exception when trying to validate.

As a work around, I inherited the AsiMembershipProvider and overrode the "ValidateUser" method by redirecting to the iMIS SOA membership web service "ValidateUser". This works and I can now log in. However, I would rather not add this service to my system architecture if I can help it. Why would the web service work when the AsiMembershipProvider doesn't.

PHP Toolkit talked about at Innovations

I am looking for information in the PHP toolkit that Marty talked about during Innovations... is anything posted here?

Resolving Variables in Text

(Initial, informal version; updated version to come.)

New in 15.1 is a standard class for resolving "variables" in a body of text. The class is Asi.VariableResolver (in Asi.dll). It's pretty simple; you give it a body of text, with variables (denoted by []) included, and pass it either a set of Name/Value pairs, a list of IAtom objects, or both, and it returns the text with all the matched variables replaced by their respective values.

Creating iMIS Groups

Creating and Managing iMIS Groups in code

This article contains sample code and discussion of creating Groups via the iMIS .NET APIs.

Groups Overview

There are two kinds of groups in iMIS: Simple Groups and Detail Groups. Simple groups are, for lack of a better term, pretty simple: they are essentially a collection of contacts, each with a Join Date and (optional) Drop Date. Detail groups are similar to Simple Groups, but they add the concept of Roles; each Group Type can have a specific set of roles defined, and members within each group can have zero, one, or many roles within the group. Either group type can be used for iMIS security assignments.