Agenda of the new 16.2.10 smart UI advanced Workshop

“Extended SDK Parts” 1.5 days

Content:

  • Additional Widgets
    • Webreports
      • NodesListReportView
      • TilereportView
      • FilteredCountChartView
      • Carousel Widget View
      • parameter.prompt.form
      • table.report
      • status.screen
      • open.webreport.js (action to show the Parameters form)
  • binf-Datepicker
    • Using the build in datepicker
  • binf-switch
    • Using the binf-switch to turn checkboxes and radio buttons into switches
  • Workflow
    • Workflow Components
    • Workflow in smartUI including Workflow Status (new in 16.2.4)
    • Starting Workflows
    • URL Routes
    • Workitem Model
    • Workitem Actions
    • Workitem Extension
    • Writing Workflow Extensions
    • REST API Support for Workflows
  • Connected Workspaces
    • Configurationvolume
    • Header
    • xECM: Office365 Groups
  • Extended ECM
    • xECM: Header Widget with Business Object Infos
    • xECM: Snapshot of current document Attachments
    • xECM: Dossier View Widget
    • Event Action Center
  • Widgets not part of the SDK
    • Mobile Scanning
    • Discussion Widget
    • Engineering Doc Management: Search
    • MyShares

“Extended SDK Features” 0.75 days

Content:

  • Build Language Packs for Internationalization
    • How to build an English language template
    • How to build the language pack
  • Commands
    • Implementation and Inheritance from “CommandModel”
    • Best Practices
    • Attributes, Methods
    • Using Commands
  • Custom URL Router.
    • Routing, adding custom Routers.
    • Using Routers as Navigation.
    • Perspective Routers
  • Authenticators and Regions
    • Authenticators
    • Non-Attaching Region
    • Non-Emptying Region
    • Script Executing Region
  • Behaviors. What are Behaviors?
    • DefaultActionBehavior
    • ExpandingBehavior
    • InfiniteScrollingBehavior
    • PerfectScrollingBehavior
    • Search Behavior
    • CollectionErrorBehavior
    • CollectionStateBehavior
    • ItemErrorBehavior
    • ItemStateBehavior
  • Mixins.
    • What are Mixins?
    • Discussion of the main mixins
      • LayoutViewEventsPropagationMixin
      • ViewEventsPropagationMixin
      • AutoFetchableMixin
      • NodeAutoFetchableMixin
      • ConnectableMixin
      • NodeConnectableMixin
      • FetchableMixin
      • ResourceMixin
      • NodeResourceMixin
      • UploadableMixin
      • CommandableMixin
      • ExpandableMixin
      • AdditionalResourcesV2Mixin
      • V2CommandableMixin
      • ExpandableV2Mixin
      • FieldsV2Mixin
      • RulesMatchingMixin
      • SyncableFromMultipleSourcesMixin
  • Browsable Support for Collections.
    • Using the “Browsable” support for Model-Collections.
  • Widget Options for the Perspective Manager
    • Wire up your widget options that they can be configured at the Perspective Manager Level

“Additional things to consider” 0.75 days

  • Tips and Tricks
    • Add a OTDS Ticket already in the browser to the connection object
    • Re-using a OTDS Ticket as LLCookie
    • Checking the paths in the test/index.html
    • Adding non CSUI supported jQuery functions in a view
    • Add additional jQuery Libraries
    • Adding Controls to a widget
    • CKEDITOR 4 new
      • Intro
      • JQuery Non-SDK example
      • Usage in the SDK
    • Handlebars advanced
      • Handlebars QuickStart
      • Expressions
      • Helpers
      • Helpers with html output
      • Helpers with Hash Object
      • The Helper fn property
      • The helper inverse property
      • Partials
      • Helpers in the SDK
      • 188 Handlebar Helpers
    • LESS advanced
      • LESS installation
      • Using LESS variables
      • Using Mixins in LESS
      • Parametric Mixins
      • Guarded Mixins
    • D3 new
      • What is D3
      • Basic Elements
      • Zooming and Panning
      • D3 in the smartUI SDK
    • Moment new
      • What is Moment?
      • Performing Time Calculations
    • Alpaca new
      • What is Alpaca?
      • Content Server Support for Alpaca
      • Alpaca Tutorial

“One or two more things” 0.5 days optional

  • Accessibility in Bootstrap. Screen reader support and what’s to change in the SDK to support screen readers for visual impaired users.
    • What is Accessibility
    • Kinds of Disabilities
    • Accessibility and the law
    • WAI-ARIA
    • ASSETS.CMS.GOV
    • PayPal Bootstrap Accessibility Plugin
    • Web Experience Toolkit WET
    • Other resources
    • Best Practices in smartUI development
      • Pre-Development Steps
      • Preparation Steps
      • Development Steps
      • Integration Steps
      • Documentation Steps
  • Development Infrastructure for security aware Organizations new
    • Recommendations what’s to do if the reloading of npm modules during the creation of a widget is not wanted

1 Day optional Discussion of actual problems

Discussion of actual problems

Here actual problems from the widget development are discussed. This part has to be discussed and defined in advance.

New: We are offering custom widget development. Interested? Send an e-mail to merz at ebit-company.de stating the purpose of the widget and requesting a qoute

Agenda of the new 20.2 Smart UI Base Workshop

CSUI Components

Day 1 (10:00-17:00)

Chapter 1

Agenda. A short introduction to this agenda

Chapter 2 The different GUIs.

The new smart GUI. How smartUI works. Setting up landing pages with the new GUI. Using Perspectives and build them with the Perspective Manager. Use Webreports to build custom widgets. The new perspective element and the difference 20.2 to previous versions.

Using widgets on another portal w/o content server.

Exercises:

  • Build a custom perspective
  • Build a custom widget based on a web report

Content:

  • Chapter 2.1: The different UI Possibilities
    • Examples: Connected Workspaces
    • Examples: xECM
    • Examples: Documentum D2 Smart View
    • The Big Picture. See the GUI components in the Content Server Environment
    • Functional Components of the smartUI SDK
  • Chapter 2.2: smartUI Overview
  • Chapter 2.3: Diving deeper in the smartUI
    • Role-Based Content Server Pages
    • User Interface
  • Chapter 2.4: Perspectives Overview
    • Scenario: Creating a new Perspective
  • Chapter 2.6: The Perspective Manager
    • General Information
    • Rules for Role-Based Perspectives
    • Layout Behavior
    • Configure Widgets
  • Chapter 2.6: The Toolbox. An overview of the visual components in the SDK. The usage will be discussed later in the SDK

Day 2 (9:00-17:00)

Chapter 3 REST

REST. What is REST? Overview of REST Services

Chapter 3.1 REST. Consuming REST Services with Postman.

  • Using REST Services.
    • Authenticate a User
    • Test a REST Operation in Postman
    • Filtering and Expanding Data in the request
    • REST API Clients
    • Tips and Tricks.

Exercises:

  • Use POSTMAN to get used to REST, Authenticate in REST
  • Try several REST commands and get an overview over the various options
  • Build a REST based html page, which queries a node

Chapter 3.2 Extending REST Services.

How to build a new REST Service in OSCRIPT.

Exercises:

  • Build a custom REST Service in a new Content Server Module. Later in Chapter 10, this REST Service will be modified and be the server-side base of our first widget

Content:

  • Handling Requests with REST API
  • RESTful object
  • Create a module for REST extension
  • REST API module in Content Server 20.x
  • Resources, actions and prototypes
  • Adding parameters to the prototype
  • Test a new REST resource
  • Tips and Tricks for REST Services with smartUI
    • Table Query inside a REST Service
    • Getting nodes with complex categories
    • Handling complex Categories

Chapter 4 A very short intro to JavaScript Patterns.

That’s what any developer of the SDK sees inside the SDK. A short tour through the JavaScript patterns required to understand the SDK and the underlying frameworks. This is based on Stefanov “JavaScript Patterns” O’Reilly, ISBN 978-0-596-80675-0, which is very recommended. Some new Aspects of ECMA6, Promises, Deferrals are also discussed

Content:

  • Introduction and References
  • ECMAScript Versions
  • Chapter 4.1 The Patterns
    • Promises
    • JQuery Deferred
    • XMLHttpRequest
    • Immediate Functions
    • Immediate Object Initialization
    • Function Properties—A Memorization Pattern
    • Configuration Objects
    • Function Application (also with smartUI examples)
    • Schönfinkelizing or currying a function
    • Mix-In Inheritance copy all properties to a child
    • Borrowing Methods
  • Chapter 4.2: Object Creation Patterns
  • Chapter 4.3: Sugar methods
  • Chapter 4.4: Object Design Patterns
    • Singleton
    • Object Decorators (used quite often in the smartUI SDK)
  • Chapter 4.5: DOM and Browser Patterns
    • Web Workers (only in recent browsers) long running scripts

Day 3 (9.00-17:00)

SDK Infrastructure Intro

Chapter 5 SDK Infrastructure Intro

Introduction to Infrastructure needed for the SDK. All components and frameworks will be introduced. Introduction to Backbone with a Tutorial, Marionette as the extension of Backbone is also covered by a tutorial.

Exercises:

  • Backbone Tutorial. Building a browser-based TODO List
  • Marionette Tutorial. Extending the TODO List with Marionette

Content:

  • Chapter 5.1: Bootstrap
    • A CSS and JS framework as the base of smartUI
  • Chapter 5.2: Node.JS
  • Chapter 5.3: Require.js
    • Overview
    • How to use require.js.
  • Chapter 5.4: Backbone.js
    • Views
    • Events
    • Models
    • Collections
    • Routers
    • Models and Views
    • Collections
    • View Rendering
    • Routing with URLs
    • A simple Backbone Tutorial
  • Chapter 5.5: Marionette.js
    • Marionette Views – Layouts
    • Marionette Views – Regions
    • Tutorial: A simple Backbone-Marionette App
    • Recommended Tools
      • Backbone Debugger
      • Marionette Inspector
    • Python based client for mozilla-marionette
  • Chapter 5.6: Handlebars.js (Overview, more in depth in the advanced training)
    • A html template framework
    • Handlebars SDK usage
  • Chapter 5.7: Yeoman
  • Chapter 5.8 Grunt.js
    • Tasks Configuration
    • Starting grunt
    • Some examples of GRUNT tasks
    • CSUI sdk custom grunt tasks
  • Chapter 5.9 Additional Libraries. Here the libraries are quickly discussed. For a more in-depth discussion, please refer to the Advanced Workshop.
    • Short Overview of D3, the interactive SVG Graphics package inside the SDK
      • D3 GANTT Chart example
    • Short Overview of Alpaca, the forms package inside der SDK
      • Alpaca Example
      • Alpaca Support in the Content Server
  • Chapter 5.10 Additional Infrastructure
    • Python
    • CORS – Cross Origin Resource Sharing Chrome Plugin
    • Inkscape/wingrep/fiddler
    • SVG viewer
    • Markdown

Day 4 (9:00-17:00)

Chapter 6 smartUI Intro BASIC

What is the SDK, Prerequisites, documentation? Download and install the SDK.  Examine the structure. Style Overrides, an overview. We look at all framework homepages to find examples and documentation. Using fiddler to examine underlying functionality. What’s possible with the SDK. Discussion of how to add new node types, new commands. Discussion of the controls and the widgets in the SDK (basic level).

Exercises:

  • Find the SDK and download the SDK
  • Install the SDK
  • Build a Project Directory
  • Prepare the Demo Widget “Hello”
  • Install this in the CSIDE Module from Chapter 4
  • Test this widget in the Perspective Manager

Content:

  • 6.1 Introduction
    • Content of the SDK
    • How to develop
      • JS IDE Webstorm
      • JS IDE Eclipse
      • Notepad++
  • 6.2 Installing the SDK.
  • 6.3 Building the Demo Widget
  • 6.4 CSS Style Overrides Binf (OpenText Bootstrap Version)
  • 6.5 General Overview
    • General Architecture
    • Coding Guidelines
    • csui.onReadyx  
    • Logging, Internationalization and Localization
  • 6.6 Content of the SDK
    • The Connection Object
  • 6.7 Routing Preview (see adv. Training for a more detailed discussion)
  • 6.8 New Command
  • 6.9 Custom Column
  • 6.10 Metadata
  • 6.11 Define a new Nodetype
  • 6.12 Create a Widget
  • 6.13 Base Widgets. Detailed info’s on base widgets.
    • Favorites
    • Recently Accessed
    • MyAssignments
    • Shortcut (depreciated in 16.2.10)
    • Shortcuts
    • Metadata
    • NodesTable
    • Thumbnail
    • DocumentOverview
    • Search Results
    • node.state
    • Permissions and Permission Explorer
    • Html.editor
    • Navigation Header
  • 6.14 Controls and Contexts
    • Controls
      • Node Picker
      • Modal Alert
      • File Open
      • Perspectives: Grid, Single, Left-Center-Right, Tabbed, Tabbed-Flow
      • Tile
      • ListView
      • ListItem
      • Signin
      • UserPicker
      • Breadcrumps
      • Checkbox
      • Dialog
      • Disclosure
      • Error
      • Form – with alpaca.js
      • Globalmessage
      • Grid
      • Zip&Download
      • Visual Count Control
      • Integration Folder Browser
      • Integration Target Picker
    • Contexts
      • Detached objects
      • Permanent objects
      • Temporary objects
      • Page Context
      • Browsing Context
      • Perspective Context
      • Portal Context
  • 6.15 Models and Factories
    • NodeModel
    • Other Models
    • Factories
      • Fetchable Factory
      • Configurable Factory

Day 5 (9:00-16:00)

Rest of Chapter 6: SDK

The remaining parts of yesterdays SDK intoduction

Chapter 7 Mockup Data and Testing

MockJax is used to mock up data (no need for a Content Server during development of a widget) and the Jasmine Framework is used to for the testing of the widgets or other JavaScript modules

Content:

  • Mocking Up Data
  • MockJax
  • Setup and Usage
  • Jasmine Usage

Chapter 8 The anatomy of the example widget Hello.

A detailed voyage in the source of the widget. (Explanation of all js files, the test folder, css and language settings)

The Chapters 9-11 are exercises. Chapter 12 is a Real-Life Demo/Exercise. Depending on the time left, these parts can be cut down.

Chapter 9 The anatomy of the myAssignment Widget.

A detailed voyage in the source of the widget. (Explanation of all js files, the test folder, css and language settings)

Chapter 10 Add another Widget to the one already loaded.

Recap the complete workflow how to implement a widget from Unit7. Add the Greeting Widget (another simple Widget from the samples) to the Greetings Widget.

Exercises:

  • Add the Greeting Widget to the Content Server
  • Test using the Perspective Manager
  • Modify the widget (by doing several things as implementing a control from the library)

Chapter 11: Build a custom Widget (optional)

Our First Widget.

Use the Hello Widget, modify it to call the REST Service we build in Unit 3.2. Modify this REST Service to provide a better JSON Structure.

Exercises:

  • Modify the Hello-Widget. Add a model for our REST Service. Add a handlebar template to output our greetings from the server. Add some css effects

Content:

  • Subdirectory Structure
  • Some Changes to our REST Service
  • Files to create
  • Add mockup support, once the answer is clear defined
  • Test with index.html
  • Start „npm start “the local server in the dev folder
  • Compile the new bundles file with grunt
  • Install on Content-Server
  • Open the perspective manager
  • Problem with Chrome. Official Chrome BUG: (Issue 611328 https://bugs.chromium.org/p/chromium/issues/detail?id=611328)

Chapter 12: Strategies to “widgedize” an existing legacy gui module and to add things to an existing module (optional)

The strange word “to widgedize” stands for “Build a widget for a legacy module not already supporting widgets”. The Strategies on amending a Module by adding a widget and on adding additional functionality inside an existing widget are discussed. In the complete practical workshop, these widgets are implemented also on the Server side, whereas here no server implementations are made.

Content:

  • Moving from a legacy gui module to a smartUI module
    • Examine a legacy module and rebuild a smartUI widget (here only on the client side)
    • As an example, the barcode module
  • Add a functionality in an existing widget
    • Add an email functionality in the Connected Workspaces Team Widget.
    • Usable from inside the Widget

Handouts and Class Material

A share accessible for all attendees as source of this handouts is required.

Handouts

  • Reiner’s Cheat Sheet for CSUI Widgets
  • Reiner’s CSUI Workflow Cheat Sheet (advanced Session only)
  • Backbone.js Offline Manual (Offline Webpage)
  • Bootstrap 4 Cheat Sheet (Offline Webpage)
  • REST Demo guides Memberinfo and Nodeinfo
  • REST Demo Guide Create a REST Service

Class Material

  • Backbone Tutorial TODO Application
  • Marionette Tutorial TODO Application
  • Our first homemade widget
  • REST Exercises
  • myfirstNode.js
  • Material for Chapter 12 including the client side js apps

Training conditions

  • The training is remote using Microsoft Teams in these Corona times.
  • The training materials are in english, the trtaining lanbguage is english or german, depending on the geographical location.
  • The customer needs to setup a stand alone training VM with a Content Server and Database. A copy of these machine must be provided as the Trainer Machine to us, on which the training is held.

New: We are offering custom widget development. Interested? Send an e-mail to merz at ebit-company.de stating the purpose of the widget and requesting a qoute

New Trainings for smartUI and Content Server 16.2.10

Content Server 16.2.10 gave us a lot of new Features, which require a new Traininigs.

Therefore there is a Workshop Line of smartUI Trainings and a new Practical Series.

Workshop Line: The two Workshops Content Server SmartUI Workshop Basic and Contnent Server smartUI Workshop advanced have been extended to 16.2.10. As always this Workshops give the explanation, what and why is going on in der SDK

  • Content Server Smart UI Workshop Basic
  • Content Server Smart UI Workshop Advanced

The Practical Series include a complete Implementation of Widgets, REST Services and Contnent Server based Applications in the form of Business Workspaces. So this part is more a Workshop for the practical usage of smartUI. As the content of the Workshop Line is required in the Practical Series, a knowledge comparable to this Workshop Line is recommended for attending the practical Series.

  • Practical Series I: Strategies to “widgedize” an existing Content Server module and to add functionality in an existing widget.
  • Practical Series II: Building an EVENT Management System in the Content Server using a graphical smartUI Dashboard and Connected Workspaces

New: We are offering custom widget development. Interested? Send an e-mail to merz at ebit-company.de stating the purpose of the widget and requesting a qoute

New in 16.2.10: New Favorites, MyAssignments and RecentAccessed Widgets

New in the actual Content Server Release 16.2.10 are redesigned Favorites, My Assignments and Recently Accessed Widgets.

All three widgets can now be expanded from an Icon located at the upper right. And the expanded view is no longer a popup Window, its a separate view, giving you much more space to display. Also, there are node Commands available at the entries

Lets start from with the Recently Accessed widget:

The new Recently Accessed Main View
with the new menu

Here we see, that the expanded view has been moved to the upper right. And direct node commands are available from the menu

The expanded view of the recently accessed widget
The new expanded view of the recently Accessed Widget

To leave the expanded view, simply click on the Arrow at the upper left.

Next, we have a new Favorites Widget

Favorites Widget
The new Favorites Widget

By hovering over the entries, there are new node commands available (here for the business workspace). Also the expand Icon moved to the top right.

Favorites Expanded View
Favorites Expanded View

This is an example of the Favorites expanded view.

The next is the MyAssignments Widget

The MyAssignments Widget
The MyAssignments Widget

and the expanded view is

MyAssignments Widget expanded
The MyAssignments Widget

Interesting, isn’t it?

New: We are offering custom widget development. Interested? Send an e-mail to merz at ebit-company.de stating the purpose of the widget and requesting a qoute

Quick List of all Categories and Attributes in a Content Server

Looking for a quick list of all Categories and Attributes configured in a Content Server? Tired of browsing the Categories Volume? Want to see all attrobutes and their IDs in a list?

Easy.

Simple use this line as your URL

<server><OT base><cgi>?func=attributes.dump

(p.ex. http://myserver/myContentServer/cs.exe?func=attributes.dump)

This will return this list:

The attribute.dump output
The attribute.dump output

Although this is a screenshot from a Contentserver 16.2.6, you can use this command at least back to Version 10.5.

 

The Cluster Manager is dead in Content Server 16.2.6 – Long live System Center Manager

In Content Server 16.2.6 the Cluster Manager is gone.

Whenever you try to open the Admin pages, you see this:

Admin Page 16.2.6

The new Entry “Cluster Management”

Install the System Center Software

First, you have to download and install the System Center Software. Clicking on the Link “Download Software” directly connects you the the Knowledge Center. After logging into this Knowledge Center, you’ll arrive at the  Landing Page for the System Center.

Knowledge Center “System Center Landing Page”

The System Center(s) are avaliable for Windows and for Linux servers. Select the proper version for your system and download it.

Install it.

You’ll find the System Center directly in the list of programs, like here in Windows Server 2012

Configure it

Double Click to start. Next, you’ll see the System Center Home Page

Like in the cluster management, you’ll need to download an agent per Content Server system and install that agent at that particular system – Click on Download and Install Agent.

(dont forget your local system!).

Next, you have to register the systems, onto which you just unstalled the agents. Go back to the “Home” of the System Center and click on “Register Systems”

Under “Managed Systems”, you see all systems already registered, under “Pendig systems” there are all systems with agents recognized by the System Center.

Click on the entry in the column “Actions” on the system pending, and you can register the agent. A Click will give you the detail view (here the system is already registered)

So you are nearly done!

Click on “Discover Products” for this particular system at the bottom of the page and the system is checked for all supported products and those installed are listed.

 

How to check for patches and install them?

Easy. Until now, you did the setup.

This has to be done only once.

Go back to the “Home” and click on “Check for Updates”

This will lead you to the “Products” tab with Updates for the registered product.

Either expand the “Avaliable Patches” entry and select the patches you want to install or select all by checking the checkbox at “Avaliable Patches”. Then click on “Download Selected” and see the system working.

First you need to login into Knowledge Center

Patch Download started

 

Press Close and you see the download window. As the download is done async, you see green marks (downloaded and installed) and also the moving circles (waiting for download or still in progress)

Download Window in System Center

 

It also provides a list of supported products by clicking “Catalog” from the “Home” page of the system Center

Catalog of supported products

The latest releases are listed directly in the calalog overview.

 

So the System center is much better then the Cluster Management doing updates.

 

 

 

 

 

 

 

 

 

Technical Training “How to program a Widget in the new Content Server GUI” with the CSUI SDK

Hi folks

Beeing Content Server Trainer, I was asked to provide a training “How to program a Widget for the new Content Server GUI” to several customers. This is about the content of such a training and the reason why such a training is technically really advanced.

CSUI SDK introduces a shift in paradigma, the server is no longer providing the GUI, all is done by a Javascript Application at the client side.

Basic Training (newest version 1.005 from Feb/2018)

The basic training is very compact and lasts 5 days.

First, lets take a look on the components:

As a prerequisite, a firm knowledge of CSIDE, How to build a module, the Node Structure and whats to do with Content server Nodes is necessary.

At the end of the training, you’ll have a working knowledge of:

  1. Content Server Perspectives. What are they and how you can use them to provide a user specific interface.
  2. Content Server REST. This is the only possibility for the client to communicate with the server, so its mandantory to know the REST interface from the application point of vue. And, as REST can be very slow due to unneccesary data, its also mandantory to know, how to add REST services to the Content Server to get the data you want in the fastest way.
  3. Javascript. There are Javascript Patterns, which are used heavily in the SDK. If “Javascript Object Inheritance”, “Currying/Schoenfinkelizing”, “Decorators” etc are weird words for you, this chapter is the right chapter for you.
  4. Next is the infrastructural world of the sdk.

    CSUI Components
    The CSUI Components

    There are several components, which must be understood prior to build a Widget.

    1. node.js is the base Javascript system for our development
    2. grunt.js is a Javascript task runner, which we use to build, test and debug our widget
    3. yeoman is a scaffolding system, which will be used by a Opentext extension to initialize the development folder. It also creates the skeleton of a Content Server module, which is used as a “Carrier” for our Widget(s)
    4. backbone.js is the base framework to be used
    5. marionette.js is an extension to backbone.js, making Views easier.
    6. handlebars.js is the html templating framework used in the sdk
    7. require.js is the javascript module loader to be used
    8. bootstrap.js/binf.js is originally the public domain CSS/JS framework from Twitter for the appearance of the Widget. Binf is the Opentext variant, allowing to override CSS without negative effects
  5. Next is the SDK itself. Due to time restrictions, in the base training are only the base functions, the advanced training covers the other aspects. It contains
    1. Installing the SDK
    2. Building the Demo Widget
    3. CSS Style Overrides binf
    4. General Overview of the SDK
    5. Content of the SDK
    6. Routing (Preview of the Advanced Training)
    7. New Commands
    8. Custom Columns
    9. Metadata
    10. Define a new NodeType
    11. Create a Widget
    12. Base Widgets
    13. Controls
    14. Models
  6. Mockup and Test Data. How to setup mockup REST data. How to build test facilities in the SDK
  7. Anatomy of the Hello Widget. A walktrough through this widget
  8. Anatomy of the MyAssignment Widget
  9. Add another Widget to the Content Server. Change the Hello Widget and add additional fields
  10. Build a Custom Widget to be used as Client with a custom REST service. Here, a custom widget is build, which uses an extended version of the custom REST service from Part 2.
  11. If time allows: Some Tips and Tricks from a “Work-in-Progress” Widget

 

Advanced Training (Version 1.005 Feb/2018)

OK, thats the basic training. There are a lot of additional things inside the SDK, but to understand these, there must be a couple of weeks with practical experience in between. The advanced part has beed remodelled to include a couple of interesting things.  The advanced part contains:

  1. Chapter 1 Extended SDK Parts
    1. Additional Widgets
      1. NodesListReportView
      2. TilereportView
      3. FilteredCountChartView
      4. Carousel Widget View
      5. Userwidget eSocial
      6. ActivityFeedWidgetView
      7. ActivityFeedContent
      8. ChatWidget
    2. Datepicker
    3. switch
    4. Workflow (new in Content Server 16.2)
      1. Workflow Components
      2. Workflow in smartUI
      3. Starting Workflows
      4. URL Routes
      5. Workitem Actions
      6. Workitem Extension
      7. Writing Workflow Extensions
    5. New REST API Support (16.2) for Workflows
    6. Widgets not part of the SDK
      1. Mobile Scanning
      2. xECM: Header Widget with Business Object Infos
      3. xECM: Snapshot of current document Attachments
      4. xECM: Dossier View Widget
      5. Engineering Doc Management: Search
      6. xECM: Office365 Groups
  2. Chapter 2 Extended SDK Features
    1. Build Language Packs for Internationalization
    2. Commands
      1. Implementation and Inheritance from “CommandModel”
      2. Best Practices
      3. Using Commands
    3. Custom URL Router. Routing, adding custom Routers. Using Routers as Navigation.
    4. Behaviours. What are Behaviours?
      1. DefaultActionBehaviour
      2. BlockingBehaviour
      3. ExpandingBehaviour
      4. InfiniteScrollingBehaviour
      5. PerfectScrollingBehaviour
      6. PageLeavingBehaviour
    5. Mixins. What are Mixins? All available Mixins.
    6. Browsable Support for Collections. Using the “Browsable” support for Model-Collections.
  3. Chapter 3 Additional Things to consider
    1. Tips and Tricks (Work in Progress- List can change)
      1. Add a OTDS Ticket already in the browser to the connection object
      2. Re-using a OTDS Ticket as LLCookie
      3. Checking the paths in the test/index.html
      4. Using Helpers for supporting a select box with Handlebars
      5. Adding non CSUI supported JQuery functions in a view
    2. Handlebars advanced. A deeper look into Handlebars
    3. LESS advanced. A deepter look into LESS, the CSS language used in Bootstrap
    4. Accessibility in Bootstrap. What can be done to add support for screenreades etc to Bootstrap/Binf? Whats to avoid? Which tools are available
    5. Best Practices in Development

 

As you can see, there is a lot of stuff. The basic training last 5 days, the advanced training 2. But on the other side, you’ll get happy users with your new Widgets.

And that’s all what counts.

References

Javascript
  • “JavaScript Application Design “as a general introduction (covering Grunt) https://www.manning.com/books/javascript-application-design
  • Stoyanow’s JavaScript patterns http://shop.oreilly.com/product/9780596806767.do
  • Flanagan’s “JavaScript: The Definitive Guide” http://shop.oreilly.com/product/9780596805531.do
  • Crockfords “Javascript The good Parts” http://shop.oreilly.com/product/9780596517748.do
  • Flanagans “JavaScript Pocket Reference” http://shop.oreilly.com/product/0636920011460.do
Bootstrap
  • Spurlock: Bootstrap Responsive Web Development http://shop.oreilly.com/product/0636920027867.do
  • Syed Fazle Rahman: Jump Start Bootstrap: Get Up to Speed With Bootstrap in a Weekend https://www.amazon.com/gp/product/0992279437
  • Alan Forbes: The Joy of Bootstrap: A smarter way to learn the world’s most popular web framework https://www.amazon.com/gp/product/1522792813/
Require.JS
  • Greg Franko: Instant Dependency Management with RequireJS How-to https://www.amazon.com/Instant-Dependency-Management-RequireJS-How/dp/1782169067
  • David Sulc: Structuring Backbone Code with RequireJS and Marionette Modules
    https://leanpub.com/structuring-backbone-with-requirejs-and-marionette
Backbone
  • Developing Backbone.js Applications Adnan Osmani http://shop.oreilly.com/product/0636920025344.do
  • js Patterns and Best Practices Swarnendu De https://www.amazon.com/Backbone-js-Patterns-Best-Practices-Swarnendu/dp/1783283572
  • js Cookbook Vadim Mirgorod http://shop.oreilly.com/product/9781782162728.do
  • js Blueprints Andrew Burgess http://shop.oreilly.com/product/9781783286997.do

 

Backbone-Marionette
  • Getting Started with Backbone Marionette Raymundo Armendariz, Arturo Soto
    https://www.packtpub.com/web-development/getting-started-backbone-marionette
  • Marionette.js: A Gentle Introduction David Sulc https://leanpub.com/marionette-gentle-introduction
  • Marionette.js: A Serious Progression David Sulc https://leanpub.com/marionette-serious-progression
Mockjax and Jasmine
  • js Cookbook Vadim Mirgorod https://www.packtpub.com/mapt/book/web_development/9781782162728 Chapter 8
  • KnockoutJS Essentials Jorge Ferrando
    https://www.packtpub.com/application-development/knockoutjs-essentials
  • JavaScript Testing with Jasmine Eva Hahn https://www.safaribooksonline.com/library/view/javascript-testing-with/9781449356729/

 

Content Server Trainings
  • 4-0140 Content Server IDE (CSIDE) Fundamentals
  • 971-301 Livelink ECM Enterprise Server Workflow Customization Fundamentals
  • 03-0117/8 Webreports Design

 

 

Installing and activating Content Server Web Services on a Content Server Installation

If you are thinking on using Content Server Webservices (CWS´) you may wonder how to activate this on a standard Content Server Installation. Normally, right out of the box, CWS is not active or installed, although you got the license to use it in your basic license.

As Administrator, you have to do a couple of things to activate CWS.

Decide which architecture you will use.

CWS can be used inside of the Microsoft Internet Information Server or inside a Java Application Server like Tomcat. Both ways to activate will be described here.

Locate the CWS Software

Look in your install directory of the content server. There, you will find a directory named “webservices”.

Webservices Basedirectory

Here, there are three entries:

  1. dotnet contains all CWS service definitions for use inside the Microsoft IIS
  2. java contains all webapps for use inside the Tomcat application server
  3. java6 contains the same thing as in 2. but for use with java 6.
Installing CWS inside the Microsoft Internet Information Server IIS

First, let’s examine how to install CWS inside IIS. Switch to the dotnet subdirectory, then to cws (do not use les-services, this is an old version supporting legacy clients)

All svc files for installation

Locate the .svc files you wish to install and use in CWS.

Open the IIS Manager. Create a new Application at the default web site

Create a new Application

App pointing to CWS

Enter the path to the dotnet\cws directory , enter for example CWS as alias.

Remark: IIS must be configured to

  • execute .NET 2.0 apps
  • allow “Read” and “Script” rights to the new app
  • execute WCF (can be ensured for example by “%SystemRoot%\Microsoft.NET\Framework\v3.0\Windows Communication Foundation\ServiceModelReg.exe -i”  (check, if something changed, if you are using newer versions)
  • allow “Read” and “Execute” rights for the ID of the Application pool on $OTHOME/webservices/dotnet

And (don’t forget), ensure that your webservides will use the same port as your content server uses.  If you use a nonstandard port (not 2099) you need to change the port in the file $OTHOME\webservices\dotnet\cws\web.conf

If you use the standard port, there is nothing for you to do.

 

Installing CWS in Tomcat

Alternatively, you can use Tomcat as a base for CWS.

In this case, go to the java6 base directory in the webservices dir.

The war files

In this dir, you’ll find the war (web application archive) files, which you need to deploy.

Deploy the cws.war file either to the TOMCAT\webapps directory or use the Tomcat service manager to deploy this file.

The tomcat webapps dir

Don’t forget, if you changed your port number of your content server from 2099 to something else, change also the value in the web.xml of the unpacked cws web app.

The port in the web.xml file

If you don’t use the same port numbers, the whole system will listen to different ports and will do nothing.

Test your installation

Your installation is correct, if a browser, pointing to

http://127.0.0.1:8080/cws/services/DocumentManagement  (Tomcat) or

http://127.0.0.1//cws/Documentmanagement.svc?wsdl (IIS) shows

DocumentManagement

Remark: The WSDL Urls reflect the infrastructure of course. You see “:8080” only with Tomcat.

 

And now, feel free to discover the new world of content web services.

Calling OScript from Java Code (2)

In December 2016, we discussed how to call Java code from OScript . Now, we’ll discuss the other way round, how to call OScript from Java. This can be quite useful, if you want to use your business logic implemented in java against the content server.

The Java code must be put in the ojlib directory (see the previous post on this topic).

As always, if you want to deploy your java code within a module, do this

  • Build your code into jar files.
  • Add the jar files in OTHOME/ojlib/ or OTHOME/module/yourmodule_yourversions/ojlib/ directory (and their subdirectories) to be recognized by Content Serverk JVM’s application classloader.

The base thing is, you call OScript built-in functions through the OScriptObject.runScript method from a java coding.

For example, the java code

OScriptObject.runScript("echo","System.ThreadID()");

will display the unique integer for the current thread ID at the console (or in the logs, if you do not use CSIDE)

You can call all OScript functions and scripts. This example will list all nodes in the enterprise workspace

     // List nodes in the Enterprise workspace.
            result = (Map<String,Object>) OScriptObject.runScript( "$LLIAPI.NodeUtil.ListNodes",
				prgCtx,
				"(ParentID=:A1)",
				args );

prgCtx is the standard rogram Context, args is the ArrayList containing the arguments and A1 points to the first entry in the args array to be used as ParentID.

The next example can be used to get the current user from java coding, extract its userID and then derives the user name from ths user id. A standard logger is used to log the output, replace this with the logger of your preference.

    public static String getUserName( OScriptObject prgCtx )
    throws Exception
    {
        String retval = " user not found";
        
        try
        {        
            // get the user session object
            OScriptObject uSession = (OScriptObject) prgCtx.invokeScript( "USession" );
            // get the userID from the User Session
            Integer userID = (Integer) uSession.getFeature( "fUserId" );
            // display it
            logger.log( Level.INFO, "UserID is " + userID );
            
            retval = "The current login User: " + userID;
            
            // Get the Users name from the User ID
            Map<String,Object> status = (Map<String,Object>)
			OScriptObject.runScript( "$LLIAPI.UsersPkg.NameGetByID", uSession, 1000 );
			
            logger.log( Level.INFO, String.valueOf( status ) );
            logger.log( Level.INFO, (String) status.get( "Name" ) );
        }
        catch( Exception e )
        {
            logger.log( Level.SEVERE, "Caught Exception", e );
            throw e;
        }
        
        return retval;
    }

 

In the next posting on this topic, we’ll discuss the Mappings from JAVA to OScript and vice versa.

 

Execute a Livereport from OScript and get the results

From time to time, you may want to execute a livereport from an OScript function and get the results for further processing. This can be done quite easy.

First, you should have the node id of the report to execute.

In this scriptlet, the node id of this livereport to execute is nodeid

Second, you should setup a list with all input parameters. For each input parameter, create an assoc with inputType, label, prompt, textvalue and value of the parameter.

Add this assoc to the list of input parameters.

Store this list in the pExtendedData field of report node.

Object llnode = $LLiApi.LLNodeSubsystem.GetItem( $TypeReport )
Assoc data = llnode.ExecuteReport( prgCtx.fDBConnect, extdata )

Get the llnode of the report by calling the LLNodeSubSystem.GetItem. Execute the report by using llnode.ExecuteReport

The result of the livereport is in data.contents.

The whole call can look like this:

 node = DAPI.GetNodeById(prgCtx.DapiSess(),nodeid)
 if node.pSubType == $TypeReport // Is node a livereport?
     Assoc extdata = node.pExtendedData
     Assoc inp
    //Create input parameters assoc
     Assoc inp
     inp.inputType = "String"
     inp.label = "inputlabel1"
     inp.prompt = "DataID"
     inp.textValue = Str.String ( DataID )
     inp.value = Str.String ( DataID )
 
     //Attach inputs parameters list to extendeddata
     List inputs = {inp}
     extdata.inputs = inputs
     llnode = $LLiApi.LLNodeSubSystem.GetItem($TypeReport)
     Assoc data = llnode.ExecuteReport(prgCtx.fDBConnect, extdata)
     result.OK=true
     result.data = data.contents
     return result
end