Friday, 31 March 2017

TACTIC Javascript API Start-up

Using the TACTIC 4.6 API from javascript is very simple.  You just have to reference
a single javascript file.  You can either reference a local copy of this file:

<script src="js/tactic.js"> </script>

Or you can reference it from TACTIC server itself:

<script src="http://<server>/context/spt_js/tactic.js"> </script>

Replace <server> with your own server IP or domain name running TACTIC.  This
will import all the necessary javascript libraries and functions to interact with
the TACTIC server.

Next you will need to generate an API ticket.  This key is a long unique alpha-numeric string of characters.  This ticket is added to the API key, which has the form:

http<s>://<server>/<site>/<project>/ticket/<ticket>

So, for example, you would set up the server with the following:

<script>
tactic = TACTIC.get();
var key = http://<server>/workflow/workflow/ticket/571be6bb09142c4c6b883e0c9f310f57");
tactic.set_key(key);
</script>

If you wish to build tickets dynamically, then this can be done from a custom login
screen that captures a login and password.  For there, you would execute the following:

tactic = TACTIC.get();
tactic.set_server(server);
var ticket = tactic.get_ticket(name, password);
tactic.set_ticket(ticket);

where "server" is the IP or domain name of your TACTIC Server and name and password
are user entered fields.  Once you have a ticket, this can be used until the ticket
expires on the server.

You are all ready to access any of TACTIC API functionality.  To check if you can access the server, simple run the ping method:

alert( tactic.ping() )

If it returns "OK", you have successfully accessed the TACTIC server with proper credentials.

At this point, you have the full API at your disposal.  As an example, you could run a query for tasks completed assigned to Fred:

tasks = tactic.query("sthpw/task", {
    filter: [['status','Complete'],['assigned','fred']],
} );


If you wish to run this asynchronously, you would add an on_complete callback:

tactic.query("sthpw/task", {
    filter: [['status','Complete'],['assigned','fred']],
    on_complete: (tasks) => {
        console.log(tasks)
    }
} );


Or if you wish to use promises:

tactic.p_query("sthpw/task", {
    filter: [['status','Complete'],['assigned','fred']],
} )
.then( (tasks) => {
    console.log(tasks)
} );


Or we could use an expression to get the same result:

var expression = "@SOBJECT(sthpw/task['status','Complete']['assigned','fred'])"
tactic.p_eval(expression)
.then( (tasks) => {
    console.log(tasks)
} );



The javascript implementation is a fully featured TACTIC API.  This is useful for
many applications such as server side javascript such as NodeJS, Mobile apps that
run on javascript.  It can also be used in WordPress or Drupal applications on the
browser.


78 comments:

  1. Excellent article with informative information thanks for sharing.
    Data Science Course in Hyderabad

    ReplyDelete
  2. Top quality blog with valuable information, I really enjoyed reading it looking forward for next blog update.
    Data Analytics Course Online

    ReplyDelete
  3. I found Habit to be a transparent site, a social hub that is a conglomerate of buyers and sellers willing to offer digital advice online at a decent cost.

    Artificial Intelligence Course in Bangalore

    ReplyDelete
  4. I am a new user of this site, so here I saw several articles and posts published on this site, I am more interested in some of them, hope you will provide more information on these topics in your next articles. PMP Training in Hyderabad

    ReplyDelete
  5. Great article with excellent information found resourceful and enjoyed reading it thank you, looking forward for next blog.
    typeerror nonetype object is not subscriptable

    ReplyDelete
  6. i am glad to discover this page : i have to thank you for the time i spent on this especially great reading !! i really liked each part and also bookmarked you for new information on your site.
    cyber security training in bangalore

    ReplyDelete
  7. I Want to leave a little comment to support and wish you the best of luck.we wish you the best of luck in all your blogging endeavors.
    data science course in bangalore with placement

    ReplyDelete
  8. I really enjoyed reading your blog. It was very well written and easy to understand. Unlike other blogs that I have read which are actually not very good. Thank you so much!

    Data Science Training in Bangalore

    ReplyDelete
  9. This is a very nice one and gives in-depth information. I am really happy with the quality and presentation of the article. I’d really like to appreciate the efforts you get with writing this post. Thanks for sharing.
    Java course in Kolkata

    ReplyDelete
  10. I am really happy to say it’s an interesting post to read . I learn new information from your article , you are doing a great job . Keep it up

    Data Science Training in Hyderabad

    ReplyDelete
  11. Fantastic Site with relevant information and content Shared was knowledgeable thank you.

    AWS Training in Hyderabad

    ReplyDelete
  12. Heya just wanted to giive you a quick heads up and let
    you know a few of thhe images aren’t loading properly.
    I’m not sre why but I think its a linkinng issue.
    I’ve tried it in two different web browsers and both show tthe same outcome.부산오피

    ReplyDelete

  13. Togel Online Live Draw Sydney berlokasi di Macau,
    yang merupakan bidang Judi terpopuler & mengklaim melebihi Tuturnya Vegas sebagai
    Togel Online Live Draw Sdy terbesar ia Didunia
    Meneruskan resor terkini menaikkan tempat & sehabis itu menjadi
    koleksi untuk selamanya sepenuhnya 4 pemain profesional.

    ReplyDelete
  14. Happy to chat on your blog, I feel like I can't wait to read more reliable posts and think we all want to thank many blog posts to share with us.

    Machine Learning Course in Bangalore

    ReplyDelete
  15. Great tips and very easy to understand. This will definitely be very useful for me.
    data scientist certification malaysia

    ReplyDelete
  16. Very good message. I came across your blog and wanted to tell you that I really enjoyed reading your articles.

    Digital Marketing Course in Bangalore

    ReplyDelete
  17. As I am looking at your writing, 온카지노 I regret being unable to do outdoor activities due to Corona 19, and I miss my old daily life. If you also miss the daily life of those days, would you please visit my site once? My site is a site where I post about photos and daily life when I was free.


    ReplyDelete
  18. Thanks for sharing this blog. It was so informative.
    Phases of hacking
    Steps of hacking

    ReplyDelete
  19. 사설토토
    토토사이트


    I’m not sure why but I think its a linking issue. I’ve tried it in two different web browsers and both show the same results. Check other way to work it out.. Thanks!

    ReplyDelete
  20. Nice post. I learn something more challenging on different blogs everyday. It will always be stimulating to read content from other writers and practice a little something from their store. I?d prefer to use some with the content on my blog whether you don?t mind. Natually I?ll give you a link on your web blog. Thanks for sharing.


    토토사이트
    토토

    ReplyDelete
  21. I am here for the first time. I found this table and found it really useful and it helped me a lot. I hope to present something again and help others as you have helped me.

    Business Analytics Course in Nagpur

    ReplyDelete
  22. Hello students, we provide UK's best assignment help for all subject students. so if you need any type of assignment help then visit "Uk assignment help" and hire "Assignment writing help uk", we will complete your assignment before your last date. students are getting the advantage of the service don't be late click now

    ReplyDelete
  23. This comment has been removed by the author.

    ReplyDelete
  24. Thank you for sharing this information with us, and best wishes with your upcoming blog.

    fashion designing course in Pune

    ReplyDelete
  25. Thank you so much for sharing a this kind of useful. information
    Site: Marlboro retro jacket

    ReplyDelete
  26. That is why I will definitely share your blog with my friends. I wish you success!
    Site : Flying Tigers Jet Nose Art A2 Jacket

    ReplyDelete
  27. To be a successful fashion designer, you must have unique and inventive fashion skills. Candidates in the field of fashion design must also be up to date on the latest techniques and trends in the industry. Buyers, for example, are looking forward to purchasing more sustainable products. As a result, thorough investigation and analysis skills are required before launching the new set of designs. Click here to learn more about Fashion Designing Course in Pune.

    Fashion Designing Course in Pune

    ReplyDelete
  28. Great knowledgeable article on Javascript API
    I know this is off topic but if you need help with your essay writing in Malaysia then you can hire Essay helper Malaysia and get your essays finished by the experts.

    ReplyDelete
  29. SAP affirmation is turning out to be progressively significant to workers and organizations as SAP keeps on adding new applications, apparatuses and interfaces for virtually every area of business the executives. You can get this declaration as a part of a degree or through an independent course. The SAP course incorporates a few modules between key to specialized sorts covering practically all parts of business the board. It gives the ability to oversee SAP business by configuration, including hierarchical design arrangement, broadening arrangements and that's only the tip of the iceberg. SAP-ensured experts can fabricate data stockrooms, plan input screens and oversee information bases.

    SAP Training in Chennai
    SAP Course in Chennai

    ReplyDelete
  30. Get essay assignment help from qqi assignments, which offers "pay to write my essay" services. With this service, we complete your assignments with high-quality content on time and at a low cost.

    ReplyDelete
  31. The roles of the Data Scientist and Data Analysts job roles are different. Given under are the tasks of the Data Scientist and Data Analyst respectively.


    Data Science Course in Jaipur

    ReplyDelete
  32. Excellent post. I really enjoy reading and also appreciate your work. This concept is a good way to enhance knowledge. Keep sharing this kind of articles, Thank you.POS Software Solutions in Singapore

    ReplyDelete
  33. I think it's a very good idea. I wouldn't have a better idea. You are a very smart friend. How can you be so smart? I envy you very much.안전놀이터추천

    ReplyDelete
  34. I was introduced to this site by a friend. There are a lot of good posts. I'll visit often.

    ReplyDelete
  35. Nice article! It was very innovative thing with unique title and keep it up...
    how to get a divorce in va
    online solicitation of a minor

    ReplyDelete
  36. This comment has been removed by the author.

    ReplyDelete
  37. Thank you for sharing your valuables. It’s a nice post shared. I enjoyed your site and I believe is quite a knowledgeable piece for everyone. Thank you for sharing. uniport basic studies admission form deadline

    ReplyDelete
  38. Thanks for sharing this valuable post.
    Seek the best Business Law Case Study Help at a student-friendly price. We have law experts who assist you with 100% plagiarism free work. You can avail of our top-notch Case Study Writing Services with authentic content writing. We always strive for the quality of the assignment papers with on-time delivery.

    ReplyDelete
  39. Thank you for sharing this information
    Do you need help with your Best assignment help UK ? Don’t worry
    Assignment Task is one of the most famous and trusted assignment help in the UK, USA, Canada, Malaysia, Singapore and others worldwide. We are giving our services with good quality of work. We have a team of brilliant Top writers who assist students in their assessment projects. We are 24/7available on the internet at: https://assignmenttask.com/

    ReplyDelete
  40. This comment has been removed by the author.

    ReplyDelete
  41. This comment has been removed by the author.

    ReplyDelete
  42. Thanks for sharing! Very informative. Software Testing Course in Pune with 100% Placement.

    ReplyDelete
  43. If you're a student in Ireland, you can find reliable research paper help Ireland from experienced writers who have a deep understanding of the academic standards and requirements of Irish universities.

    ReplyDelete
  44. Engage the most pleasing HND assignment assistants online to compose an assignment, essay, homework, HND Assignment Help UK & other academic papers for UK students. Case Study Help UK will help you achieve high grades to impress your professors behind getting HND qualified. We have professional writers to create plagiarism-free content in HND-written papers.

    ReplyDelete
  45. Are you a Student, and do you need Online Assignments / Homework Answers for any Questions? You can contact us online anytime because Assignment Task is a 24/7 assignment help services provider at a reasonable price. We offer assessment answers to all questions.

    ReplyDelete
  46. I have found a smart and educative blog web here. Nice and beautiful articles. Looking forward to more. Thanks for the interesting idea.- lasuth postgraduate in echocardiography admission requirements

    ReplyDelete
  47. Great blog
    As a student, it's essential to submit high-quality assignments that meet the standards set by your professors. But Greeceassignmenthelp.com can help. Their writers are dedicated to providing quality programming assignment help online Greece that can help you achieve your academic goals. We follow a strict quality assurance process to ensure that every assignment meets the highest standards of quality.

    ReplyDelete
  48. Are you facing a problem writing your MBA Assignment Writing? No worries, Case Study Help UK can quickly solve your problem and clear all doubts about your assignment project. We have a team of highly qualified MBA/PhD top writers, and they help students provide writer with their MBA Assignment Writing Services with plagiarism-free and original content. Meet us on the Internet at our website.

    ReplyDelete
  49. Dear students, do you need help with your finance assignment? Visit assignmenttask.com to write your project in any subject at a pocket-friendly price. We provide top-notch Finance Assignment Help from skilled finance experts. Our experts fulfill customers' demands as they require. We provide various subjects related to finance like accounting, business etc.

    ReplyDelete
  50. Case Studies Help Researchers
    Case Studies Help Researchers are Australia-based Assignment Writing Company for Quick Assistance. Our expert writers write an assignment with an analysis of the topic. We are here with a team of the best assignment writers to help with all kinds of academic assignment writing. Our experts specialize in an extensive subject field reinforced with the best assignment solutions. Students can meet us online via live chat support.

    ReplyDelete
  51. This site is an essential resource for anyone looking to break into the tech industry or take the next step in their tech career. With its comprehensive list of job openings and user-friendly job search tools, you can quickly and easily find the right opportunity for your skills and experience. The site also provides helpful resources for job seekers, such as salary guides and resume writing tips. Whether you're just starting out in tech or looking to take your career to the next level, this site is a valuable tool for achieving your goals. >> part time job japan it

    ReplyDelete
  52. Do you need high-quality Business Plan Assignment Help in UAE? Visit us for more kind of information at Assignmenttask.com! We provide the most useful Assignment Help in UAE and writing services at pocket-friendly costs in all subjects. Our experts understand all guidelines and rules of colleges and universities, so they make unique content according to directions.

    ReplyDelete
  53. Are you looking for CDR Report Writing Help? You can contact us through live chat on our website at CDR Australia. We are all time present to help students. My CDR Australia has a dedicated group of experts and engineers. We provide all types of documents like CDR Report, CPD Report and Career Episode Writing etc.  

    ReplyDelete
  54. 24/7 Hours Available online is the most reliable Study Assignment Help for Editing Company in UAE for students. At Studyassignmenthelp.com supply editing and proofreading services from subject matter experts. They help students who want better grades on their homework projects. Do you want an A+ score and impress your professor? Don't late hurry up and get help from us.

    ReplyDelete
  55. Do you want assistance from the world’s no.1 CDR report and other writing services? Consultant our highly qualified and experienced engineer experts to attain academic excellence with us at CDR Australia. We provide top-quality papers at a low cost. Students can contact us through live chat.

    ReplyDelete
  56. Study Assignment Help Editing Assistance in the UAE for students of universities and colleges. We are furnishing editing and proofreading services by academic experts. Study Assignment Help also offers assignment help and writing services with proofreading assistance at the best price.

    ReplyDelete
  57. Avail your Corporate Law Assignment Help from native law experts in the UAE from Assignmenttask.com! We offer the best assignment writing help from our team of professional writers in various subjects. The Assignment Task is always present online for students.

    ReplyDelete
  58. Are you facing a problem writing your Competition and Consumer Law Assignment Help? Don’t you understand how you write your assessment project for better grades? Don’t worry! Assignmenttask.com is here. We propose assignment help and writing services in all subjects from our experts. Students can contact us via live chat.

    ReplyDelete
  59. Choose CDR Australia to write your best CDR report and other articles. We have a large team of engineers and experts with skilled and experienced. We provide high-quality work at the lowest price in the UAE. We always present online for students.

    ReplyDelete
  60. Study Assignment Help specializes in providing editing and proofreading services to students. Our affordable services are highly regarded in the UAE. Our dependable experts are always available to help you with your requirements. You can rely on us to enhance the quality of your academic work.

    ReplyDelete
  61. Thanks for providing valuable information, keep us posted more also wanted to learn about python then visit: Python Course in Nanded
    Best IT Training Provider

    ReplyDelete
  62. Great Post
    Engineers, scientists, and tech professionals elevate your career with our technical CV writing service. CVWritingServices.ie specializes in crafting technical resumes that showcase your skills and experience. Get noticed in your niche with our specialized CV assistance.

    ReplyDelete
  63. Techblog southpawtech is a great resource for tech news and information. The blog covers a wide range of topics, from new gadgets to software reviews. The writing is clear and concise, and the site is easy to navigate. I highly recommend it to anyone who is interested in tech.
    estates lawyer near me

    ReplyDelete
  64. Online NGO registration in India has streamlined the process of establishing a Non-Governmental Organisation (NGO) with efficiency and convenience. Aspiring NGOs can initiate the registration procedure through the Ministry of Corporate Affairs' portal. The first step involves creating an account and selecting a suitable name for the organisation, ensuring it adheres to naming guidelines. Once the name is approved, the requisite documents such as the organisation’s memorandum of association, articles of association, and a detailed project report must be uploaded. Additionally, the PAN and Aadhar cards of the organisation’s founders are to be submitted. The entire process is completed online, eliminating the need for physical visits to government offices. This digital approach expedites the NGO registration process and promotes transparency in the sector, fostering a more accessible environment for those aiming to make a positive impact on society through their initiatives.

    ReplyDelete
  65. motorcycle accident virginia
    The TACTIC JavaScript API Start-up is a valuable tool for developers and organizations looking to leverage its capabilities. Its purpose is clear, its accessibility is easy, and its comprehensive documentation is crucial for effective use. Code examples are encouraged to demonstrate how to use the API for common tasks. The API's integration with existing projects or workflows is assessed, and its flexibility is discussed. The learning curve for developers is also discussed, and support resources such as forums, tutorials, and customer support are provided. The API is tested for compatibility with different platforms, browsers, and frameworks, and version updates are discussed. Performance is evaluated in real-world scenarios, and security measures are discussed. The API's licensing model and pricing structure are also discussed. User feedback is encouraged to improve the API's quality. The review serves as a valuable resource for developers and organizations considering the TACTIC JavaScript API Start-up, offering insights into its usability, documentation, and potential benefits for their projects.

    ReplyDelete
  66. The blog post provides a comprehensive guide on how to use the TACTIC 4.6 API in JavaScript, offering step-by-step instructions and code snippets. It emphasizes the flexibility in generating API tickets based on user input, and provides examples for querying data and handling responses asynchronously. abogado de sucesiones cerca de mí

    ReplyDelete