{"id":317,"date":"2015-01-20T11:40:49","date_gmt":"2015-01-20T01:40:49","guid":{"rendered":"http:\/\/www.docx4java.org\/blog\/?p=317"},"modified":"2015-01-20T11:40:49","modified_gmt":"2015-01-20T01:40:49","slug":"content-controls-for-business-data-connectivity","status":"publish","type":"post","link":"https:\/\/www.docx4java.org\/blog\/2015\/01\/content-controls-for-business-data-connectivity\/","title":{"rendered":"Content controls for business data connectivity"},"content":{"rendered":"<p>Sometimes, Word is a natural way for people to interact with back end applications (eg SAP).<\/p>\n<p>This is particularly so when:<\/p>\n<ul>\n<li> business data will be output to a Word document,<\/li>\n<li>the user is more familiar with Word than the other system,<\/li>\n<li>certain data updates may be required (and are permitted)<\/li>\n<\/ul>\n<p>So maybe there are 4 high level categories:<\/p>\n<ul>\n<li>apps which support commercial transactions (a recipient will receive a Word document), eg\n<ul>\n<li>employment onboarding (letter of employment)<\/li>\n<li>invoicing<\/li>\n<\/ul>\n<\/li>\n<li>apps with a reporting component: \u00a0is the report format a natural interface if it was made bi-directional?<\/li>\n<li>workflow\/BPM systems which present documents (work orders, proposals, approvals etc)<\/li>\n<li>policy\/procedures in regulated industries, where a worker must follow a series of steps. \u00a0Can present that in a docx; the worker can tick the steps off as they do them\n<ul>\n<li>related training scenarios?<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>Microsoft had an emphasis on what they then called &#8220;Office Business Applications&#8221; back around the Office 2007 launch. \u00a0Fast forward to today, and &#8220;business connectivity services&#8221; are part of SharePoint.<\/p>\n<p>But<strong> you can achieve the same sort of thing without SharePoint<\/strong>, using docx4j and data bound content controls.<\/p>\n<p>Once you have your back end data in an XML format (and there are many tools\/techniques to help with this), you can use content controls to bind what the user sees in Word to elements in that XML.<\/p>\n<p>The beauty of it is that the binding is bi-directional, so if the user edits the document, the XML is updated (ie it stays in synch).<\/p>\n<p>After the user has made their edit, you can update the back end application. \u00a0Typically, you&#8217;d do this after they saved &amp; closed the document (ie outside Word, using docx4j), but you could also do it from within Word (a less good approach, but still, an option).<\/p>\n<p>What if there is some data which the user shouldn&#8217;t be able to edit? \u00a0You simply lock the content control to prevent editing.<\/p>\n<p>To quickly try out this approach, put together some sample XML, then <a href=\"\/blog\/2015\/01\/i-have-my-xml-now-what\/\">upload it as explained here<\/a>, to get a docx you can experiment with.<\/p>\n<p>We&#8217;d loved to hear about how you might use this approach?<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Sometimes, Word is a natural way for people to interact with back end applications (eg SAP). This is particularly so when: business data will be output to a Word document, the user is more familiar with Word than the other system, certain data updates may be required (and are permitted) So maybe there are 4 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-317","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.docx4java.org\/blog\/wp-json\/wp\/v2\/posts\/317","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.docx4java.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.docx4java.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.docx4java.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.docx4java.org\/blog\/wp-json\/wp\/v2\/comments?post=317"}],"version-history":[{"count":3,"href":"https:\/\/www.docx4java.org\/blog\/wp-json\/wp\/v2\/posts\/317\/revisions"}],"predecessor-version":[{"id":328,"href":"https:\/\/www.docx4java.org\/blog\/wp-json\/wp\/v2\/posts\/317\/revisions\/328"}],"wp:attachment":[{"href":"https:\/\/www.docx4java.org\/blog\/wp-json\/wp\/v2\/media?parent=317"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.docx4java.org\/blog\/wp-json\/wp\/v2\/categories?post=317"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.docx4java.org\/blog\/wp-json\/wp\/v2\/tags?post=317"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}